[Make Theme] Specify Menus for Different Pages
-
I’d like to have different menus appear on different pages.
This thread outlines perfectly what I want to do and teknohippy’s contributions have been incredibly helpful: https://www.ads-software.com/support/topic/custom-menus-on-different-pages?replies=23
I have followed it successfully, with the proper menus appearing on the proper pages, except that the menu in question isn’t appearing in the spot I have specified. It appears below the header and I would like for it to appear in the “Primary Menu” section of this theme, just below the site title.
This is the code I put in my header.php file:
<?php wp_nav_menu( array( 'container' => 'none', 'container_class' => 'menu-header', 'theme_location' => 'primary', 'menu' => get_post_meta( $post->ID, 'MenuName', true) ) ); ?>
You can view the test website here:
https://www.iccoalitiontest.org/The “State Guide” page should display the “State Guide menu” just below the site title and all other pages should display the “Default Menu.” I’ve titled the menus accordingly to make it easier to see which one it is displaying. It doesn’t seem to matter what I put as a theme-location, the menu always appears in the same place.
I am using a child theme for Make, if that makes a difference.
I’ve spent the last 3 days on this issue and would appreciate any and all guidance on what to try next!
- The topic ‘[Make Theme] Specify Menus for Different Pages’ is closed to new replies.