For a page template I am trying to include the 3 children of each page. That works fine.
However as I want to include a different image for each of the children, I would like to add the
slug of each child to the
li on the parent page.
I found something that places the
slug of the parent page in the
<?php $slug = basename(get_permalink()); wp_list_pages('title_li=&sort_column=menu_order&link_before=<div class="'.$slug.'">&link_after=</div>&child_of='.$post->ID.''); ?>
Obviously not what I want, but at least nice to see that it is possible somehow to add something to the li in order to be able to identify it further with CSS.
I would like the result to be something like:
<ul> <li class=child1-slug>...</li> <li class=child2-slug>...</li> <ul>
OR (as the example above shows)
<ul> <li><a><div class="child1-slug">...</div></a></li> <li><a><div class="child2-slug">...</div></a></li> </ul>
Can anyone push me in the right direction?