WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the following to list my pages:

<ul id="nav">
   <?php wp_list_pages('title_li='); ?>

is there a way of highlight the link of the page of the current in the navigation. It shouldn't be fixed. The user should be able to call the page whatever he or she wants, and create as much pages as he or she wants (the highlight feature should still work).

Any suggestions or tutorials?

share|improve this question
up vote 2 down vote accepted

wp_list_pages has support for CSS styles. The current page is marked with the class .current_page_item. You can style it as you want.

Check http://codex.wordpress.org/Function_Reference/wp_list_pages#Markup_and_styling_of_page_items for reference.

share|improve this answer

You can also have more control using the wp_nav_menu function for WordPress, here's the documentation for that. I also wrote a post outlining how to style the current page item while using the wp_nav_menu here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.