Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Menu functions.php Code(creating theme locations)
- <?
- //add dynamic menu
- add_action( 'init', 'register_my_menus' );
- function register_my_menus() {
- register_nav_menus(
- array(
- 'primary-menu' => __( 'Primary Menu' ),
- 'secondary-menu' => __( 'Secondary Menu' ),
- 'footer-menu' => __( 'Footer Menu' )
- )
- );
- }
- ?>
- +++++++++++++++++++++++++++++++
- Display menu location in theme
- <?php wp_nav_menu(array('theme_location' => 'primary-menu')); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement