Got a request for help from some the Eyebeam list. The folks organizing the Urban Wilderness Action Center for the international Electrosmog festival wanted some usability help. Â Navigating between subpages of their projects was too confusing.
If you like the way the sub pages are listed out on, say, the Berlin Micro-Turf Expedition – here you go.
<?php
// Does this even have a parent?
if($post->post_parent) {
$parent_title = get_the_title($post->post_parent);
?>
<a href="<?php echo get_permalink($post->post_parent) ?>"><?php echo $parent_title;?></a>:
<?php } ?>
<?php
//ok let's find our sibling pages, but we don't need to list the current page
if ( ($post->post_parent) && (get_post($post->post_parent)->post_parent) )
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&exclude=".$post->ID."&echo=0");
else
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
if ($children) { ?>
<ul style="display:inline">
<?php echo $children; ?>
</ul>
<?php } ?>
- The Eyebeam folks are doing a cool skillshare on how “Tools and Models for Online Collaboration” (back)
- It starts March 20th! Â It’s completely free! Â Go! (back)