PLEASE: current-menu-item / current_page_item NOT working on custom pages.
-
Hi
I have been reading and reading about this and I am ready to give up. Please. help me on this.
It’s simple:
The CSS classes are fine.
The problem is, that when I click on a sub-item in my sidebar:
The post is rendered through single.php. Right.
The problem is that in my top nav menu, the class “current_page_parent” or the class “current_page_item” or the class “current_page_ancestor” is NOT being added to the main menu
-
example:
When on a main menu item directly:<div id="access" role="navigation"> <div class="menu-header"><ul id="menu-main-menu" class="menu"><li id="menu-item-442" class="menu-item menu-item-type-custom menu-item-home menu-item-442"><a href="https://gcsa.camarahost.co.za/">Home</a></li> <li id="menu-item-249" class="menu-item menu-item-type-post_type current-menu-item page_item page-item-97 current_page_item menu-item-249"><a href="https://gcsa.camarahost.co.za/who-we-are/">Who We Are</a></li> <li id="menu-item-250" class="menu-item menu-item-type-post_type menu-item-250"><a href="https://gcsa.camarahost.co.za/what-we-do/">What We Do</a></li> <li id="menu-item-251" class="menu-item menu-item-type-post_type menu-item-251"><a href="https://gcsa.camarahost.co.za/our-work/">Our Work</a></li> <li id="menu-item-255" class="menu-item menu-item-type-post_type menu-item-255"><a href="https://gcsa.camarahost.co.za/blog/">Blog</a></li> <li id="menu-item-257" class="menu-item menu-item-type-post_type menu-item-257"><a href="https://gcsa.camarahost.co.za/news-press/">News & Press</a></li> <li id="menu-item-253" class="menu-item menu-item-type-post_type menu-item-253"><a href="https://gcsa.camarahost.co.za/contact/">Contact</a></li> </ul></div>
AND THEN
when on a post that is not renedered via the blog or hom page:
<div id="access" role="navigation"> <div class="menu-header"><ul id="menu-main-menu" class="menu"><li id="menu-item-442" class="menu-item menu-item-type-custom menu-item-home menu-item-442"><a href="https://gcsa.camarahost.co.za/">Home</a></li> <li id="menu-item-249" class="menu-item menu-item-type-post_type menu-item-249"><a href="https://gcsa.camarahost.co.za/who-we-are/">Who We Are</a></li> <li id="menu-item-250" class="menu-item menu-item-type-post_type menu-item-250"><a href="https://gcsa.camarahost.co.za/what-we-do/">What We Do</a></li> <li id="menu-item-251" class="menu-item menu-item-type-post_type menu-item-251"><a href="https://gcsa.camarahost.co.za/our-work/">Our Work</a></li> <li id="menu-item-255" class="menu-item menu-item-type-post_type menu-item-255"><a href="https://gcsa.camarahost.co.za/blog/">Blog</a></li> <li id="menu-item-257" class="menu-item menu-item-type-post_type menu-item-257"><a href="https://gcsa.camarahost.co.za/news-press/">News & Press</a></li> <li id="menu-item-253" class="menu-item menu-item-type-post_type menu-item-253"><a href="https://gcsa.camarahost.co.za/contact/">Contact</a></li> </ul></div>
This issue prohibits WordPress from being used where custom queries are involved.
How can this be fixed? I use WP 3.01..
Thanks
Jacques
-
- The topic ‘PLEASE: current-menu-item / current_page_item NOT working on custom pages.’ is closed to new replies.