WordPress.org

Forums

current_page_item on page depth 1 when on a child page (2 posts)

  1. Vizionn
    Member
    Posted 8 years ago #

    Simply there is a top navigation which shows all pages to a depth of 1 (no child pages).

    Is there any way to get the class attribute "current_page_item" on the parent page rather than the exact page?

    Thanks, Andy

  2. mdwilli
    Member
    Posted 8 years ago #

    I get different behavior. When I set a page depth=1 for the sidebar navigation, the "current_page_item" CSS class appears only on those parent pages that have child pages. It does not appear on the child pages themselves nor on the parent that lacks a child page. I'm using WordPress 2.0x.

    I suspect this is a bug. When I set the depth to either 0 or 2, all the pages have the "current_page_item" class.

Topic Closed

This topic has been closed to new replies.

About this Topic