• I would like to use the current_page_item class in my “Pages” tree-view to bold the current page.

    My problem is that since the sub-pages are nested within the li element that gets the current_item_class, the style formatting gets applied to child pages as well, which is not what I want.

    If the child pages received a current_page_child style, similar to the current_page_parent style that gets applied to the parent page, I would know how to resolve this. However, the children do not seem to have any particular identifiers, so I am at loss as to get rid of the bold-style for the children of the current page, while maintaining it for the current page itself.

Viewing 2 replies - 1 through 2 (of 2 total)
  • try:
    li.current_page_item ul li a {how it should look}

    if you have more levels just add on:
    li.current_page_item ul li a, li.current_page_item ul li ul li a {style}

    Thread Starter torfason

    (@torfason)

    Thanks, this turned out to be the way to address it. What I did exactly, was to add the following lines to my style definition.

    <style type=”text/css”>
    .current_page_item {
    font-weight: bold;
    }

    ul .current_page_item ul{
    font-weight: normal;
    }
    </style>

    This way, the current page is always bold, and other pages – including subpages, are non-bold. I’ve tried this with two levels, it might need tweaking for further levels.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘current_page_item gets applied to subpages as well’ is closed to new replies.