How do i highlight the present Wordpress page by using this code:
<div id="menu"> <ul> <li> <?php wp_list_pages('title_li=&depth=1&exclude=52'); ?> </li> </ul> </div>
Based in the (huge) documentation for [cde]:
All list products (
wp_list_pages()) produced by
liare marked using the class
page_itemis known as while exhibiting a webpage, their email list item for your Page is offered the extra class
So make use of the
Yeah I attempted that, but it is no longer working. Which brought me to think maybe I ought to apply certain code?
You can test and pass it the
current_page_item parameter. It will return the HTML rather than printing it and you will process it to obtain the current page, apply the course and print the end result. Not so clean, but when the standard behavior does not work, it offers a superior a workaround.
The CSS needed change color to anything you want: