Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #372771

    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?

    #372799

    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

    #372862
    This reply has been marked as private.
    #372872

    Hi!

    Try “exercises” in all lowercase.

    Cheers!
    Elliott

    #372968
    This reply has been marked as private.
    #373187

    Hi!

    Rename the menu to something simple like “exercises” and then use that in the file.

    Best regards,
    Elliott

    #373265
    This reply has been marked as private.
    #373302

    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

    #373310
    This reply has been marked as private.
    #373379

    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

    #373412
    This reply has been marked as private.
    #373485

    Hi!

    Sure, if plugin did work fine, you can undo the changes you made to the files.

    Best regards,
    Yigit

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.