Adding Multiple Menus in a Template Built From Scratch
-
Hello,
I am creating a WordPress Template from scratch.
I have a main menu running along the bottom of my header and it works perfectly. But I need to add 2 additional menus each only for a specific page. All of them need to be editable by going into the backend then navigating to: appearances –> menusI have added this code to my functions.php:
register_nav_menus( array(
‘primary’ => __( ‘Primary Navigation’),
‘services-nav’ => __( ‘Services Navigation’),
‘ourteam-nav’ => __( ‘Our Team Navigation’),
) );I have then embedded this code into the custom page template services-page.php:
<?php wp_nav_menu( array( ‘theme_location’ => ‘Services Navigation’ ) ); ?>
- The Issue
The Primary Navigation/Main Navigation that runs along the bottom of the header only shows the pages I have selected in the appearances –> menus
but
the Services Navigation displays all of the pages I have selected for the Primary Navigation plus the three I have selected for the Services Navigation.
Does someone have a fix? Keep in mind I am a noob when it comes to the php coding language.
To See A Live Example of the Issue: CLICK HERE
I am not sure how long this link will work as it is my development URL
- The topic ‘Adding Multiple Menus in a Template Built From Scratch’ is closed to new replies.