Calling an Appearance menu
-
Could someone who knows php PLEASE look at this code and tell me why the footer menus are NOT calling the pages from the menu labelled “main” in the Appearance / Menus page – instead they are listing every page that I have in my Pages section whether or not they are listed in Appearance Menus.
In my functions file, I have
<?phpif ( function_exists(‘register_sidebar’) )
register_sidebar(array( ‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ”, ‘before_title’ => ‘<h2 class=”widgettitle”>’,
‘after_title’ => ‘</h2>’,
));function register_my_menus() {
register_nav_menus
(array
(‘extra-menu’ => __( ‘main’ )));}
add_action( ‘init’, ‘register_my_menus’ );
?>In my footer file, I have:
- <?php wp_nav_menu( array( ‘theme_location’ => ‘main’ )); ?>
I’ve called my menu “main” on the Appearance Menus page, in the functions file and also in the footer file.
- The topic ‘Calling an Appearance menu’ is closed to new replies.