• shadd

    (@shadd)


    Hi Guys
    I am using wp_list_pages() to list all of my pages. I want to set a class property when a user clicks on a page. So for example, if the user clicks the ‘home’ page the class is set to class=”selected”. Is this possible ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi

    (@esmi)

    You can’t apply your own classes to wp_list_pages but, by default, the li for the current page has the class current_page_item. So you can use that class in your stylesheet to highlight the currently selected page.

    Thread Starter shadd

    (@shadd)

    excellent, thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘menu item selection’ is closed to new replies.