• Resolved colincameron

    (@colincameron)


    I am working on my own theme from scratch but im currently stuck on how to highlight the current page tab. I have been searching all day and I found a few examples but they were all for kubrick.

    Is there a trick I can use with the wp_list_pages tag?

Viewing 7 replies - 1 through 7 (of 7 total)
  • It’s built in. Just make some Pages and then check the source code of your Page with the generated list.

    Thread Starter colincameron

    (@colincameron)

    Oh boy is my face red, thanks a lot!

    Thread Starter colincameron

    (@colincameron)

    I got another question, is there a way to change the class text so if the page isnt selected theres no class and if selected it just says class=”selected”

    or just class=”current_page_item” because i keep getting class=”page_item current_page_item”

    page_item = not selected
    current_page_item = selected
    You just have to define in your stylesheet the current… and you are OK 🙂

    Thread Starter colincameron

    (@colincameron)

    Yup, I know that much but should the current page show both classes in one? like in my example.

    Thanks for the help

    Ah, yes. You don’t have to do anything with that code: WP generates it for you. The Page where you are has this in the list:
    <li class="page_item current_page_item">

    Thread Starter colincameron

    (@colincameron)

    ok just making sure i dint mess something up, thanks

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Highlight Current Navigation’ is closed to new replies.