Different main menu on subpages

Steak House, food and drink theme, is now available on support forum.
GK User
Tue Mar 31, 2015 12:09 pm
Hi,

I linked my main menu to various sections on the front page with #. But the problem arises when I use a subpage. This menu doesn't not work on subpages. So, I need an option to add additional menus to subpages, that are linked to other subpages or to the front page, via page templates. At this moment this Steak House Template does not allow me to add menus to a certain page. How do I change that?

My page is kckm.si and in the section KAJ VERUJEMO / OSTALA PODROČJA NAŠEGA VEROVANJA there is a link to a subpage.

Thank you.

M
User avatar
Senior Boarder

GK User
Tue Mar 31, 2015 10:34 pm
Hi,

The steakhouse theme load different header files for the frontpage and for other subpages, so you can replace the code from Steakhouse/header.php file after this line (change the menu location)
Code: Select all
<?php do_action('steakhouse_before_mainmenu'); ?>


Don't forget to register your new menus in functions.php file i.e. after this line:
Code: Select all
register_nav_menu( 'mainmenu_left', __( 'Main Menu Left', 'steakhouse' ) );

add:
Code: Select all
register_nav_menu( 'mainmenu_left_subpages', __( 'Main Menu Left for subpages', 'steakhouse' ) );
User avatar
Moderator

GK User
Wed Apr 01, 2015 9:59 am
Thank you Piotr,

But what did I miss? Can you be more specific! I need to assign this menus to pages. How to go about that?

http://kckm.si/?page_id=142

M
User avatar
Senior Boarder

GK User
Wed Apr 01, 2015 12:28 pm
Piotr Kunicki wrote: ... The steakhouse theme load different header files for the frontpage and for other subpages, so you can replace the code from Steakhouse/header.php file after this line (change the menu location) ...

Got it! This time I "replaced" the code, not "added" to the existing. :P

It works now.

M
User avatar
Senior Boarder


cron