• I am using the following code:

    <div id="sub_menu">
    	<?php
      		if($post->post_parent)
      			$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
      		else
      			$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
      		if ($children) { ?>
      			<ul>
      				<?php echo $children; ?>
     			</ul>
      	<?php } ?>
    		</div>

    To list a submenu of a parent page. I want to try and figure out how to add .first and .last css classes to the menu. Is that possible?

  • The topic ‘first and last css classes on a dynamic sub menu’ is closed to new replies.