[wp-hackers] current_page_ancestor class lost on Tertiary pages?

Austin Matzko austin at ilfilosofo.com
Tue Sep 14 14:54:04 UTC 2010


On Tue, Sep 14, 2010 at 9:45 AM, Louis McCoy <louie at louiemccoy.com> wrote:
> Now that I've been lurking on the list for a good long time, I've got an
> issue with wp_nav_menu that I'd appreciate some insight / help with. On a
> site I'm working on, we've got a fairly deep hierarchy of pages - for the
> sake of example, we'll say the menu item I'm fighting with is "foo." Of
> course, "bar" is a submenu item with "foo" as its parent.
>
> Here's where the problem occurs: X1 through X22 are subpages of bar - and
> when you navigate to any of these pages, the "current_page_ancestor" and
> "current-menu-ancestor" classes disappear from "foo." Of course, "bar" still
> has "current-page-ancestor."
>
> Now, these are all pages, and I haven't entered X1 through X22 in as
> tertiary menu items in the menu admin interface, since I'm not displaying
> them in the menu. I'm thinking that entering X1 through X22 into the menu
> interface and then hiding them via CSS may be my only option, but that
> doesn't seem like the best solution...

How deep are these levels?  Can you be more specific about the overall
menu structure or link to an actual example?

I created an eight-level-deep menu of page items, and I am unable to
reproduce the problem: the ancestors get the current_page_ancestor and
current-menu-ancestor classes all the way down, as expected.


More information about the wp-hackers mailing list