Hi all. Newbie here, learning child theming, loving it, totally confused.
I would like to do the following: whenever a page is selected in the main menu, I would like to list its subpages, if there are any, right below the main page content, before anything else.
Here's what I added to my child theme's function.php which, obviously, didn't work:
function metra_subpages($content) {
global $post;
$children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
if ($children) { ?>
<ul>
<?php echo $children; ?>
</ul>
<?php }
print $content;
}
add_filter('the_content', 'metra_subpages');
I've looked through the framework looking for the right filter to add but couldn't find it. I'm new to filtering and such but I've read most of the tutorials on the Thematic site. I've even managed to add a couple of working filters to my functions.php. But for the life of me I can't figure out how to do the above.
Thanks for any help.