Dynamic Menus
-
I’m developing locally, and I have added this code to my functions file:
add_action( 'init', 'register_my_menus' ); function register_my_menus() { register_nav_menus( array( 'primary-menu' => __( 'menu-top' ), 'secondary-menu' => __( 'Secondary Menu' ), 'footer-menu' => __( 'Footer Menu' ) ) ); }
I have added this code to my header file:
<?php wp_nav_menu( array( 'theme_location' => 'menu-top', 'container_class' => 'my menu' ) ); ?>
Am I filling in the correct information and in the correct locations? menu-top is the menu I have created in appearance > menus, and mymenu is the style sheet that I am trying to link to.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Dynamic Menus’ is closed to new replies.