Show subpages in sidebar


My main navigation is using the new WordPress 3 menu system. The top level items are:

Home About Product Services Contact

Each item is a dropdown with more pages listed underneath. In the sidebar, I want to list all the subpages. So if you click on About, the sidebar will show all the pages in the About dropdown menu.

This can be easily accomplished by adding the following to the sidebar.php page:


$children = wp_list_pages(‘title_li=&child_of=’.$post->ID.’&echo=0′:wink:;

if ($children) { ?>

    <?php echo $children; ?>

<?php } ?>


However, I noticed this does not work with the WordPress 3 menu system. The code does not recognize sub pages created using WordPress 3 drag and drop menu system. It only recognizes subpages when you set them by editing a page’s attributes and setting the “Parent” dropdown to the parent page.

So my question is, is there a way to list subpages in the sidebar which is compatible with WordPress 3’s menu system?