This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

North theme – Alternate menu

I’m using the North theme for my site, or rather a minimally-altered child theme of it. Aside from css changes, the main reason for using a child is that I want a different menu in non-home pages.

I’ve already changed header.php to load the “secondary-menu” on every page other than home, altered functions.php to add the new menu, and WordPress’ dashboard seems to recognise the location properly. Even the theme customiser has no trouble identifying it and, on paper, everything seems to work ok.

On the actual site, however, instead of loading the menu I have assigned, it loads the list of pages instead. I know I am missing something painfully obvious, but I have no idea what.

Any help will be appreciated.

<?php if(is_page('home')) {
    wp_nav_menu( array(
	'theme_location' => 'primary',
	'menu_id' => 'primary-menu'
    ) );
} else {
    wp_nav_menu( array(
	'theme_location' => 'secondary',
	'menu_id' => 'secondary-menu'
    ) );
}?>

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

2
  1. Alex S Staff 9 years, 7 months ago

    Hi Στέργιος,

    Would it be possible for you to send me a copy of the child theme so I can run a few tests? If so, Please upload an archived version to a 3rd party file hosting site such as teknik.io.

    To clarify, is there a specific reason why you’re using is_page() over is_front_page()?

  2. Στέργιος Μέκρας 9 years, 7 months ago

    I will upload as soon as I get back home. It’s just the three files right now, so it shouldn’t take too long. As for why I didn’t use is_front_page() …simply didn’t think of it. Changed it now, though it did not affect the issue I’m having.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread