[resolved] How can I get WP to recognise the current page for highlighted tabs? (3 posts)

  1. XLV
    Posted 8 years ago #

    Hi all,

    I'm developing my first template and I'd really like to create a navigation bar with tabs that recognises which page is open and brings that tab to the 'front'. Is this easily possible?

    A good example of what I'd like to achieve is on beccary.com.

    Many thanks in advance, and sorry if it's been asked already ^_^

  2. BPartch
    Posted 8 years ago #

    If you are using "wp_list_pages" to list your nav links then each one will get a class of "page_item" and the current one will get an additional class of "current_page_item"

    So you can target:
    .current_page_item from your .css. :)

  3. XLV
    Posted 8 years ago #

    Wow! Thank you! =D

Topic Closed

This topic has been closed to new replies.

About this Topic