• I have category links in my main menu. When you visit them, the link to my Posts Page (called Blog), highlights. Anyone know how I can turn this off?

Viewing 3 replies - 1 through 3 (of 3 total)
  • These are both blog pages so it stands to reason the blog page is highlighted as the parent. Nav menus generated by wp_list_pages markup current page, parent page and ancestor pages with the following classes:

    .current_page_item
    .current_page_parent
    .current_page_ancestor

    Logically – it’s best to keep this active page styling. However, if you really need to change it: best way to alter this is to add the body_class function to your body tag as such (if it’s not already in there):

    <body <?php body_class(); ?>>

    That way your category page will end up with a class of category

    Next you need to add a style declaration to your stylesheet for:

    .category .current_page_parent

    One that will undo what your current .current_page_parent styling does.

    Hope that helps!

    Thread Starter dbreck

    (@dbreck)

    Thank you, BrenFM. You solved my problem.

    Win! Glad I could help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Why is the Posts Page the parent of a Category Link?’ is closed to new replies.