<?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>WordPress &#8250; Support Topic: Displaying only the direct children of a parent page ( sidebar nav list)</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Topic: Displaying only the direct children of a parent page ( sidebar nav list)</description>
<language>en</language>
<pubDate>Thu, 26 Nov 2009 05:41:04 +0000</pubDate>

<item>
<title>pvf on "Displaying only the direct children of a parent page ( sidebar nav list)"</title>
<link>http://wordpress.org/support/topic/230527#post-1099093</link>
<pubDate>Thu, 11 Jun 2009 18:30:31 +0000</pubDate>
<dc:creator>pvf</dc:creator>
<guid isPermaLink="false">1099093@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hello!!&#60;br /&#62;
i think this is along the lines of what i have to do.&#60;br /&#62;
in plain English:&#60;/p&#62;
&#60;p&#62;I need to &#60;strong&#62;SELECT the posts&#60;/strong&#62; that have the same &#60;strong&#62;term_id&#60;/strong&#62; and &#60;strong&#62;parent_id&#60;/strong&#62; as the one being &#60;strong&#62;displayed&#60;/strong&#62;.&#60;/p&#62;
&#60;p&#62;how would this be created in &#60;strong&#62;SQL&#60;/strong&#62;?&#60;br /&#62;
this would also need to be dynamic, with no category ids hardcoded....&#60;/p&#62;
&#60;p&#62;please i hope somebody can help me with this! i have spent to many hours trying to figure it out with no luck :(&#60;/p&#62;
&#60;p&#62;thank you in advance....
&#60;/p&#62;</description>
</item>
<item>
<title>mayoosuf on "Displaying only the direct children of a parent page ( sidebar nav list)"</title>
<link>http://wordpress.org/support/topic/230527#post-1085324</link>
<pubDate>Thu, 28 May 2009 04:50:53 +0000</pubDate>
<dc:creator>mayoosuf</dc:creator>
<guid isPermaLink="false">1085324@http://wordpress.org/support/</guid>
<description>&#60;p&#62;@kapiljain.in &#60;/p&#62;
&#60;p&#62;its a nice code snippet, what I was searching for, and just I got it. thanks!&#60;/p&#62;
&#60;p&#62;BTW, if possible an enhancement can be done as if the chilled pages not exist better not to display the title(parent page name).
&#60;/p&#62;</description>
</item>
<item>
<title>kapiljain.in on "Displaying only the direct children of a parent page ( sidebar nav list)"</title>
<link>http://wordpress.org/support/topic/230527#post-1060814</link>
<pubDate>Thu, 30 Apr 2009 10:35:09 +0000</pubDate>
<dc:creator>kapiljain.in</dc:creator>
<guid isPermaLink="false">1060814@http://wordpress.org/support/</guid>
<description>&#60;p&#62;@sudhishchemmur &#60;/p&#62;
&#60;p&#62;It might help you:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://kapiljain.in/blog/how-to-get-page-root-parent-in-wordpress/&#34; rel=&#34;nofollow&#34;&#62;http://kapiljain.in/blog/how-to-get-page-root-parent-in-wordpress/&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>maxaud on "Displaying only the direct children of a parent page ( sidebar nav list)"</title>
<link>http://wordpress.org/support/topic/230527#post-1046098</link>
<pubDate>Wed, 15 Apr 2009 01:00:39 +0000</pubDate>
<dc:creator>maxaud</dc:creator>
<guid isPermaLink="false">1046098@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Try this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
	if($post-&#38;gt;post_parent)
		$children = wp_list_pages(&#38;quot;sort_column=ID&#38;amp;amp;depth=1&#38;amp;amp;title_li=&#38;amp;amp;child_of=&#38;quot;.$post-&#38;gt;post_parent.&#38;quot;&#38;amp;amp;echo=0&#38;quot;);
	else
		$children = wp_list_pages(&#38;quot;sort_column=ID&#38;amp;amp;depth=1&#38;amp;amp;title_li=&#38;amp;amp;child_of=&#38;quot;.$post-&#38;gt;ID.&#38;quot;&#38;amp;amp;echo=0&#38;quot;);
	if ($children) { ?&#38;gt;
		&#38;lt;ul class=&#38;quot;child&#38;quot;&#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>gabesands on "Displaying only the direct children of a parent page ( sidebar nav list)"</title>
<link>http://wordpress.org/support/topic/230527#post-1038930</link>
<pubDate>Tue, 07 Apr 2009 02:18:03 +0000</pubDate>
<dc:creator>gabesands</dc:creator>
<guid isPermaLink="false">1038930@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Look here, maybe this will help&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://codex.wordpress.org/Function_Reference/get_pages&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Function_Reference/get_pages&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>apljdi on "Displaying only the direct children of a parent page ( sidebar nav list)"</title>
<link>http://wordpress.org/support/topic/230527#post-986485</link>
<pubDate>Sat, 14 Feb 2009 23:30:17 +0000</pubDate>
<dc:creator>apljdi</dc:creator>
<guid isPermaLink="false">986485@http://wordpress.org/support/</guid>
<description>&#60;p&#62;sudhishchemmur... you can't really 'echo' an object, which is what you've asked wpdb to return. Try &#60;code&#62;print_r($post_parent)&#60;/code&#62; and see what you get. &#60;/p&#62;
&#60;p&#62;Possibly, what you want to do is &#60;code&#62;echo $post_parent-&#38;gt;ID&#60;/code&#62;. &#60;/p&#62;
&#60;p&#62;Alternately, you could use &#60;code&#62;$wpdb-&#38;gt;get_var&#60;/code&#62; which &#60;em&#62;will&#60;/em&#62; return a plain vanilla variable rather than an array or an object. If you use get_var you should be able to just echo it out.
&#60;/p&#62;</description>
</item>
<item>
<title>sudhishchemmur on "Displaying only the direct children of a parent page ( sidebar nav list)"</title>
<link>http://wordpress.org/support/topic/230527#post-982514</link>
<pubDate>Wed, 11 Feb 2009 13:13:43 +0000</pubDate>
<dc:creator>sudhishchemmur</dc:creator>
<guid isPermaLink="false">982514@http://wordpress.org/support/</guid>
<description>&#60;p&#62;I am looking for reverse functionality.&#60;/p&#62;
&#60;p&#62;I have a page by name ‘Parent Page’ and there are 5 child pages say ‘Page A’,’Page B’,’Page C’,’Page D’,’Page E’ which is under ‘Parent Page’. I want to get the parent page name listes when I am within any child page. I tried many and finally decided to write a custom code in sidebar.php&#60;/p&#62;
&#60;p&#62;&#38;lt;?php&#60;br /&#62;
$post_obj = $wp_query-&#38;gt;get_queried_object();&#60;br /&#62;
$post_ID = $post_obj-&#38;gt;ID;&#60;br /&#62;
$post_title = $post_obj-&#38;gt;post_title;&#60;br /&#62;
$post_name = $post_obj-&#38;gt;post_name;&#60;br /&#62;
$post_ParentPage = $post_obj-&#38;gt;post_parent;&#60;/p&#62;
&#60;p&#62;?&#38;gt;&#60;/p&#62;
&#60;p&#62;&#38;lt;?php&#60;/p&#62;
&#60;p&#62; $querystr = &#34;SELECT post_parent from wp_posts where ID=&#34;.$post_ID;&#60;br /&#62;
 $pageposts = $wpdb-&#38;gt;get_results($querystr, OBJECT);&#60;br /&#62;
 echo '&#60;br /&#62;##'.$post_parent.'##';&#60;br /&#62;
 ?&#38;gt;&#60;/p&#62;
&#60;p&#62;The problem is that the $post_parent always displays null. Can someone help me on this?
&#60;/p&#62;</description>
</item>
<item>
<title>tammyhart on "Displaying only the direct children of a parent page ( sidebar nav list)"</title>
<link>http://wordpress.org/support/topic/230527#post-943709</link>
<pubDate>Sat, 03 Jan 2009 16:23:25 +0000</pubDate>
<dc:creator>tammyhart</dc:creator>
<guid isPermaLink="false">943709@http://wordpress.org/support/</guid>
<description>&#60;p&#62;This is what you're looking for: &#60;a href=&#34;http://www.tammyhartdesigns.com/tutorials/wordpress-how-to-list-child-pages-in-sidebar/&#34;&#62;WordPress: How to List Child Pages in Sidebar&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>joncalex on "Displaying only the direct children of a parent page ( sidebar nav list)"</title>
<link>http://wordpress.org/support/topic/230527#post-943352</link>
<pubDate>Sat, 03 Jan 2009 05:44:09 +0000</pubDate>
<dc:creator>joncalex</dc:creator>
<guid isPermaLink="false">943352@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Here is my code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
  if($post-&#38;gt;post_parent) {
  $children = wp_list_pages(&#38;quot;title_li=&#38;#38;child_of=&#38;quot;.$post-&#38;gt;post_parent.&#38;quot;&#38;#38;echo=0&#38;quot;); }
  else {
  $children = wp_list_pages(&#38;quot;title_li=&#38;#38;child_of=&#38;quot;.$post-&#38;gt;ID.&#38;quot;&#38;#38;echo=0&#38;quot;); }
  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;
&#60;p&#62;This outputs children and grandchildren links. I want to only display the direct children for a particular page, which I will wrap in a conditional. So what I need to do is tell it not to display the grandchildren. I hope this makes sense. &#60;/p&#62;
&#60;p&#62;Anyone have the expertise to figure this out? I've had trouble searching for this online.&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
