if i am using this code to display the child pages:
<?php
if($post->post_parent) {
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
$titlenamer = get_the_title($post->post_parent);
}
else {
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
$titlenamer = get_the_title($post->ID);
}
if ($children) { ?>
<h2 style="text-align:center;margin:0px"> <? echo $titlenamer ?> </h2>
<ul>
<?php echo $children; ?>
</ul>
<?php } ?>
how would i style the sub page title and then the sub sub page title.
When i add a class to the ul, it carries over to all the li items.