Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using the following to list my pages:

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

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.