I'm currently using this code to output (using wp_list_pages) a list of the current page children.
<?
if(wp_list_pages('child_of='.$post->ID.'&echo=0&exclude=2')) {
wp_list_pages('title_li=&child_of='.$post->ID.'&exclude=2');
}
elseif(get_the_title($post->post_parent) != the_title(' ' , ' ',false)) {
wp_list_pages('child_of='.$post->post_parent.'&title_li=&exclude=2');
} ?>
I would like to merge this code with another piece that enables me to add sequential numbering to the li elements, as shown here.
<?php $list_of_pages = wp_list_pages('echo=0&title_li=&depth=1' );
$list_pages = explode('<li class="',$list_of_pages); $len = count($list_pages);
for ($i = 0; $i <= $len-2; $i++) :
echo $list_pages[$i] . '<li class="link-' . ($i+1) . ' ';
endfor; echo $list_pages[$i]; ?>
But i'm not particularly handy with PHP, if anyone could point me in the right direction to use the two snippets of code combined it would be much appreciated.