Grow your CSS skills. Land your dream job.

Change primary nav on certain pages in WordPress

  • # August 10, 2012 at 9:18 am

    Hello chaps,

    I have a custom menu set up which acts as the primary navigation across 99% of pages on a site but I’d like to set up a second custom menu that would act as the primary nav on one single other page.

    I’m comfortable adding the ‘register_nav_menus’ to my functions.php file in order to make the second custom nav show up in the dashboard of wordpress but I am having major difficulty adding the code which would tell WP to query which page/what menu to display.

    I’m guessing that I need some sort of if statement that says: if_page(pageA) then display menu2 or else if any other page then display the ordinary menu.

    Any help would be greatly appreciated, thanks.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".