Styling current_page_item in menu doesn’t work
-
Having some trouble with my menu–any help much appreciated!
My sidebar div consists of
<ul> <?php wp_page_menu('show_home=1&sort_column=menu_order'); ?> </ul>
In a view source, this shows up as
<ul> <li ><a href="https://www.ipolari.com">Home</a></li> <li class="page_item page-item-4"><a href="https://www.ipolari.com/contact" title="Contact">Contact</a></li> <li class="page_item page-item-68 current_page_item"><a href="https://www.ipolari.com/titles" title="Titles">Titles</a></li>
Etc., including more links.
Two questions:
1. I’ve been attempting to style the class “current_page_item” to change the color of the current page, but every way I’ve gone about trying to do it, nothing happens at all. The only color comes from #menu a:link, #menu a:visited in the css.2. The WP code for the menu ads these classes to the pages, but not to the link to the home page, so even if I get the style to work, it won’t affect the home page. Any way to change this?
Thanks!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Styling current_page_item in menu doesn’t work’ is closed to new replies.