/ Published in: PHP
Expand |
Embed | Plain Text
<?php global $wp_query; { $parent = $wp_query->post->ID; } else { $parent = $wp_query->post->post_parent; } ?> <?php if(wp_list_pages("title_li=&child_of=$parent&echo=0" )): ?> <div id="submenu"> <ul> <?php wp_list_pages("title_li=&child_of=$parent" ); ?> </ul> </div> <?php endif; ?>
Comments
Subscribe to comments
You need to login to post a comment.

Perfect. Does just what it says on the tin.
I've used this in conjunction with the PHP Code widget to add 'In this section' to the sidebar