Hello,
I am having difficulty creating a second menu/template (not sure what to call it). On my homepage, I have my menu displaying “about”, “contact”, etc. I’m trying to make a separate menu for when I’m on a different page. For example, if I clicked on “about”, I want it to display a separate menu.
I did research but I didn’t get too far. I created a file called template-test.php and copied the default template file into as well as copied a php script I found online. I then went to a post and selected my new template, but now I’m stuck.
Could anybody give me some insight?
Hey stewroids!
Around line 124 in /enfold/includes/helper-main-menu.php you should see this.
'menu_id' => $avia_menu_class,
Add this on the next line.
'menu' => ( is_page(321) ? 'special' : null ),
And then change “321” with the ID of your page you want to change the menu on and “special” with the name of your menu.
Best regards,
Elliott
Hi!
Try “exercises” in all lowercase.
Cheers!
Elliott
Hi!
Rename the menu to something simple like “exercises” and then use that in the file.
Best regards,
Elliott
Hey!
And your sure the page ID is 3677? It’s working fine on my XAMPP setup so I’m not sure what else to tell you here.
Cheers!
Elliott
Hi!
Aside from the suggestion above, you can create a new set of menu for different pages using these plugins:
https://wordpress.org/plugins/menu-items-visibility-control/
https://wordpress.org/plugins/zen-menu-logic/
Regards,
Ismael