Hi,
I have the following page structure:
Page 1
Page 2
---Page 2.1
---Page 2.2
Page 3
And what I want to achieve is put a menu in the sidebar to list the subpages of the current page, so if I am on page 2 I should list pages 2.1 and 2.2 but I cant get my code to work.
In other themes I have used I can just use:
wp_list_pages( 'title_li=&child_of=' . $post->ID);
but with thematic $post is always empty so it is generating pretty much a sitemap instead of a menu. My code is this:
function wa_primary_aside()
{
echo thematic_before_widget_area('primary-aside');
wp_list_pages( 'title_li=&child_of=' . $post->ID );
echo thematic_after_widget_area('primary-aside');
}
add_action('widget_area_primary_aside', 'wa_primary_aside', 10);
Any help is appreciated.
Thanks