WordPress.org

Ready to get started?Download WordPress

Forums

Pages selected class (2 posts)

  1. kartiktalwar
    Member
    Posted 6 years ago #

    hi
    i made a theme and i used the list pages tag
    the tag is

    <?php wp_list_pages('title_li='); ?>

    now i wanna add the tag so when someone goes to about page the about page class should be selected

    About

    can some1 plz tell me wat to do or modify it for me

  2. Eric Amundson
    Volunteer Moderator
    Posted 6 years ago #

    This should help:
    http://codex.wordpress.org/wp_list_pages#Markup_and_styling_of_page_items

    A class will automatically be added for the active page and you'll just need to add some CSS to style the list item with the class current_page_item - make sense?

Topic Closed

This topic has been closed to new replies.

About this Topic