Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In wordpress 3.9.1 I'm trying to create my own theme. One of the things my theme should be able to deliver is to have two menu's.

I do have that. It is working. So no worries there.

One of the menu's is the "main" menu and when selecting an item in this menu it is styled as the so named "current-menu-item". Some of the selections show a second menu at the top of the window. If I select an item in this second menu a new page is rendered and the menu item in the main menu is no longer selected.

And there is where it does not work as I want. If one of the items is selected in the top menu I still want the item in the main menu be styled as the current menu item. So my users still know in which main menu item they are.

Is there someone who can point me in the right direction on how to solve this issue?

Why I did not include any code? Because I want to grasp the idea of how to solve it and then try to build it myself. I don't want a cut-n-paste solution as I think it will not teach me that much.

share|improve this question
    
Do the "sub menu pages" and "main menu pages" have any relation? Is there a parent-child-relationship between them? –  engelen May 29 at 20:22
    
Start at this WordPress Codex. AFAIK WordPress Menus can only go two levels deep though. –  eyoung100 May 29 at 20:29
    
@engelen: Yes there is a parent-child-relation between them. –  Werner van Mook May 31 at 11:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.