Navigation Menu question
-
I’m running an old theme on 3.6 and I’m trying to introduce WP 3.0 menus to the mix. I’ve created a custom page template and dedicated header.php (header2.php) for testing. I’ve made sure to add the necessary code to functions.php:
add_action( 'init', 'register_my_menus' ); function register_my_menus() { register_nav_menus( array( 'primary-menu' => __( 'Primary Menu' ), 'secondary-menu' => __( 'Secondary Menu' ), 'tertiary-menu' => __( 'Tertiary Menu' ) ) ); }
and header2.php:
<?php wp_nav_menu( array( 'theme_location' => 'primary-menu' ) ); ?>
However, even without styling the menu in CSS, I’m not getting the defined menu I created in Appearance>Menus which I’ve called “Primary Menu”, instead I’m getting an ordered list of all pages. In addition, I’m still getting the “Your theme does not natively support menus, but you can use them in sidebars by adding a “Custom Menus” widget on the Widgets screen.” message…
Any ideas on what I’m missing here?
Thanks!
- The topic ‘Navigation Menu question’ is closed to new replies.