<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>ThemeShaper Forums Topic: How to list children pages in sidebar?</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Sun, 19 May 2013 08:43:11 +0000</pubDate>

<item>
<title>jonnycj on "How to list children pages in sidebar?"</title>
<link>http://themeshaper.com/forums/topic/how-to-list-children-pages-in-sidebar#post-19197</link>
<pubDate>Tue, 15 Feb 2011 20:00:26 +0000</pubDate>
<dc:creator>jonnycj</dc:creator>
<guid isPermaLink="false">19197@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;If not this works to display child pages as a list in a widget area.&#60;br /&#62;
The code can be pasted into an aside inside a PHP Code widget&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
// this actually works in thematic for listing child pages
// the key is defining global $post
//after that most of the wp_list_pages from the codex work
global $post;
?&#38;gt;
&#38;lt;?php
  $children = wp_list_pages(&#38;#39;title_li=&#38;#38;child_of=&#38;#39;.$post-&#38;gt;ID.&#38;#39;&#38;#38;echo=0&#38;#39;);
  if ($children) { ?&#38;gt;
  &#38;lt;ul&#38;gt;
  &#38;lt;?php echo $children; ?&#38;gt;
  &#38;lt;/ul&#38;gt;
  &#38;lt;?php } ?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>helgatheviking on "How to list children pages in sidebar?"</title>
<link>http://themeshaper.com/forums/topic/how-to-list-children-pages-in-sidebar#post-11280</link>
<pubDate>Thu, 08 Apr 2010 02:45:38 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">11280@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;don't know if you resolved this, but i am using Menus Plus+ in conjunction with Widget Context.  I create the menu in Menus Plus+, then put its corresponding widget into the sidebar... and control what pages it shows on w/ Widget Context.
&#60;/p&#62;</description>
</item>
<item>
<title>kpolice on "How to list children pages in sidebar?"</title>
<link>http://themeshaper.com/forums/topic/how-to-list-children-pages-in-sidebar#post-10669</link>
<pubDate>Thu, 11 Mar 2010 21:05:14 +0000</pubDate>
<dc:creator>kpolice</dc:creator>
<guid isPermaLink="false">10669@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I have the following page structure:&#60;br /&#62;
Page 1&#60;br /&#62;
Page 2&#60;br /&#62;
---Page 2.1&#60;br /&#62;
---Page 2.2&#60;br /&#62;
Page 3&#60;/p&#62;
&#60;p&#62;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.&#60;/p&#62;
&#60;p&#62;In other themes I have used I can just use:&#60;br /&#62;
wp_list_pages( 'title_li=&#38;#38;child_of=' . $post-&#38;gt;ID);&#60;/p&#62;
&#60;p&#62;but with thematic $post is always empty so it is generating pretty much a sitemap instead of a menu. My code is this:&#60;/p&#62;
&#60;p&#62;function wa_primary_aside()&#60;br /&#62;
{&#60;/p&#62;
&#60;p&#62;    echo thematic_before_widget_area('primary-aside');&#60;br /&#62;
    wp_list_pages( 'title_li=&#38;#38;child_of=' . $post-&#38;gt;ID );&#60;br /&#62;
    echo thematic_after_widget_area('primary-aside');&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;add_action('widget_area_primary_aside', 'wa_primary_aside', 10);&#60;/p&#62;
&#60;p&#62;Any help is appreciated.&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
</item>

</channel>
</rss>
