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.

my question is...


I have 2 pages & 2 subpages in each page. like:

page1

-->subpage1

-->subpage2

page2

-->subpage1

-->subpage2

& my Menu is Page1 page2

Now if i select subpage1(from page1) means the page1 need to active and highlight the menu. if i select subpage1(from page2) means it need to highlight page2 and page2 menu in active.

how to do this? please help me to get rid of this problem.i need to implement in my wordpress website.

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

To highlight page 1 and page 2 use current-menu-parent class

share|improve this answer
add comment

It'll be done with CSS and an active class. Check the coding on the front end to see what wordpress has added for active page. On one setup we have the class menu-item and current_page_item is added so you could style those.

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.