[wp-hackers] current_page_ancestor class lost on Tertiary pages?
Austin Matzko
austin at ilfilosofo.com
Tue Sep 14 23:39:09 UTC 2010
On Tue, Sep 14, 2010 at 4:22 PM, Louis McCoy <louie at louiemccoy.com> wrote:
> That's what I was afraid of.
>
> The question, then, would be why have both current_page_ancestor and
> current-menu-ancestor if it isn't looking at the page hierarchy anyway?
> Seems redundant to me...
It's confusing, but current_page_ancestor (underscores) is an alias
for current-menu-ancestor, for backwards-compatibility with
wp_nav_menu(). It reflects the structure of the *menu*, not the pages
themselves.
In contrast, current-page-ancestor (hyphens) is the class assigned to
a page that is the actual ancestor---as a page, not a menu item---of
the current page. So it reflects the structure of the *pages", not
the menu items.
More information about the wp-hackers
mailing list