wordpress hightlight Q

Out of context: Reply #2

  • Started
  • Last post
  • 18 Responses
  • Continuity0

    Funny, I just went through this a few days ago.

    Anyway, WP automatically generates a class on links when they're the current active one. Here's a couple:

    .current_page_item
    .current_page_parent

    All you need to do is style them according to your wishes in your CSS, like so:

    .current_page_item a, .current_page_parent a {
    color: #FFFFFF; !important
    text-decoration: none; !important
    }

    Now the parent category and the page the viewer is on is highlighted in the menu.

    Done and done.

    • Continuity, i love you. i realised i needed to solve this on a site tomorrow and wondered if possible. my beer tastes better suddenly.airey
    • QBN delivers.®Continuity
    • seldomâ„¢airey

View thread