Hi I am using this:
<?php wp_list_pages('title_li='); ?>
and it displays all my pages just fine. I need to and a custom class to the 'ul' and 'li' tags and was wondering how to do that. Thanks.
Hi I am using this:
<?php wp_list_pages('title_li='); ?>
and it displays all my pages just fine. I need to and a custom class to the 'ul' and 'li' tags and was wondering how to do that. Thanks.
html/php:
<ul class="yourClass">
<?php wp_list_pages('title_li='); ?>
</ul>
CSS:
.yourClass li {
/* insert rules here */
}Oh...I didnt realize that it wasnt adding ul tags...awesome..thanks!
My next question is, how can I add a class to the li tags then? The reason I ask is I have a 3 tier menu and when the 2nd tier has a 3rd tier item I need to add a class to it to add a little arrow next to it.
.yourClass li ul li {
/ *insert rules here */
}
You should be able to target nested li's as far in as you need to with this method.
This topic has been closed to new replies.