Support » Themes and Templates » How can I get WP to recognise the current page for highlighted tabs?
9 years, 7 months ago
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 ^_^
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. 🙂
Wow! Thank you! =D