Include Menus in Wordpress 3 Themes

Im wordpress noobie.

I am creating a new Wordpress theme. Im using version 3.3.1. I read that to create a menu I have to use the "Menu" section of each topic:

http://awesomescreenshot.com/01atql42e

But when I activate my own theme I am CREATED , this option is missing.

http://awesomescreenshot.com/0f0tqmhc6

What am I missing?

+5
source share
2 answers

Wordpress changed the code to 3.0, which generates the navigation, which you are probably using the old code. The new functionality is described here in the code.

http://codex.wordpress.org/Function_Reference/wp_nav_menu

You should also include this in your functions. php

add_theme_support ('menus');

.

http://millionclues.com/problogging/wordpress-tips/make-your-theme-wordpress-3-0-compatible/

+8

, , , , , , Wordpress. thenetimp, , add_theme_support ( "" ), register_nav_menus (% menu array%), , :

add_theme_support( 'menus' );
if ( function_exists( 'register_nav_menus' ) ) {
    register_nav_menus(
        array(
          'header-menu' => 'Header Menu',
          'footer-menu' => 'Footer Menu'
        )
    );
}

, " " " ", . wp_nav_menu (% menu name%). " ", Wordpress . , , , header.php:

 <?php wp_nav_menu( array(
                            'theme_location' => 'header-menu',
                            'container' =>'nav',
                            'menu_class' => 'menu header-menu'
                          )
                    ) ?>

"-" , nav "menu menu-menu" ( ). , , , Wordpress ()

+4

All Articles