When i access other page, i want change main menu in header.

Posted in: Newspaper
Post count: 1

I am making the my website by wordpress. But i get a problem.

When i access other page, I want change main menu in header.

For example, i made two menu(menu1, menu2). and i made two pages(page1, page2).

When i access page1, the page include menu1 in header. and when i access page2, the page include manu2.

I have question, Can i get there? Is there solution that solve the problem.

Please help me! I will reply you, you, you and you… Please…

Post count: 22421

Hello,

Unfortunately the theme does not have such an option but you can however do a css trick and hide menu elements on specific pages. you can have a menu with all the elements at once (in the same menu) and simply hide or show them where you wish with display:none and display:block
For example:
I added these 2 custom menu items: http://screencast.com/t/iVdrTjtnvnB
I want to only show one the first one on the homepage and the other one on another page.
So i will go on and hide the second menu item for the homepage like so:
.home .menu-item-3146{
display:none!important;
}

So now on the homepage i only see this: http://screencast.com/t/xrgmVHlh
In order to make the switch i hide the other one on the other page using the page id (the homepage can be targeted with the home class, for another page you need the page id that can be found here: http://screencast.com/t/QC8pprLGF)
So on the other page we will use this code:
.page-id-3026 .menu-item-3145{
display:none!important;
}

and have this result:
http://screencast.com/t/iyg5I34zWFZe
I hope this helps.
Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.