wordpress-theme / functions.php
functions.php
Raw
<?php

/* to register the menu */

add_action('init', 'register_my_menus');

function register_my_menus (){
    register_nav_menus(array(
        'hotel-main-menu' => __('primary')
    ));
}

// active image header
$args = array(
    'width' => 1920,
    'height'=> 646,
    'default-image'=>get_template_directory_uri() . 'images/header.jpg',
    'uploads' => true
);
add_theme_support('custom-header', $args);

// activate thumbnail imges
add_theme_support( 'post-thumbnails' );

// for activate widget
add_action('widgets_init','add_widget_init');
function add_widget_init(){
    register_sidebar(array(
        'name' => 'add_i_frontpage',
        'id' => 'first_widget',
        'befor_widget' => '<div',
        'after_widget' => '</div>',
        'before_title' => '<p>',
        'after_title' => '</p>'
    ));
}


?>