<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How To List WordPress Child Pages Only On That Parent Page</title>
	<atom:link href="http://www.martin-gardner.co.uk/how-to-list-wordpress-child-pages-only-on-that-parent-page/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.martin-gardner.co.uk/how-to-list-wordpress-child-pages-only-on-that-parent-page/</link>
	<description>Technology - Gadgets - Programing - Gaming - Reviews - Tutorials</description>
	<lastBuildDate>Tue, 07 Feb 2012 19:02:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: William Lindley</title>
		<link>http://www.martin-gardner.co.uk/how-to-list-wordpress-child-pages-only-on-that-parent-page/comment-page-1/#comment-48414</link>
		<dc:creator>William Lindley</dc:creator>
		<pubDate>Sat, 12 Nov 2011 14:12:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=1220#comment-48414</guid>
		<description>You can also use the &lt;a href=&quot;http://wordpress.org/extend/plugins/hierarchical-pages/&quot; rel=&quot;nofollow&quot;&gt;Hierarchical Pages widget&lt;/a&gt; which lets you list only children of the current page... and optionally all the top-level pages, plus a variety of other options. It also includes a Hierarchical Taxonomy widget that works for built-in Categories and user-defined taxonomies.</description>
		<content:encoded><![CDATA[<p>You can also use the <a href="http://wordpress.org/extend/plugins/hierarchical-pages/" rel="nofollow">Hierarchical Pages widget</a> which lets you list only children of the current page&#8230; and optionally all the top-level pages, plus a variety of other options. It also includes a Hierarchical Taxonomy widget that works for built-in Categories and user-defined taxonomies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pan X</title>
		<link>http://www.martin-gardner.co.uk/how-to-list-wordpress-child-pages-only-on-that-parent-page/comment-page-1/#comment-47182</link>
		<dc:creator>Pan X</dc:creator>
		<pubDate>Thu, 14 Apr 2011 12:51:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=1220#comment-47182</guid>
		<description>ups corrected code:

if ( is_page() ) {
global $wp_query;

      if($wp_query-&gt;post-&gt;post_parent) {
        
        $children = wp_list_pages(&#039;sort_column=menu_order&amp;title_li=&amp;child_of=&#039;.$wp_query-&gt;post-&gt;post_parent.&#039;&amp;echo=1&#039;);
      }
      else {
        $children = wp_list_pages(&#039;sort_column=menu_order&amp;title_li=&amp;child_of=&#039;.$wp_query-&gt;post-&gt;ID.&#039;&amp;echo=1&#039;);
      }

      if ($children) {
   ?&gt;
      
        
        
        
      
   &lt;?php
      } // End If Post
} // End if is page</description>
		<content:encoded><![CDATA[<p>ups corrected code:</p>
<p>if ( is_page() ) {<br />
global $wp_query;</p>
<p>      if($wp_query-&gt;post-&gt;post_parent) {</p>
<p>        $children = wp_list_pages(&#8216;sort_column=menu_order&amp;title_li=&amp;child_of=&#8217;.$wp_query-&gt;post-&gt;post_parent.&#8217;&amp;echo=1&#8242;);<br />
      }<br />
      else {<br />
        $children = wp_list_pages(&#8216;sort_column=menu_order&amp;title_li=&amp;child_of=&#8217;.$wp_query-&gt;post-&gt;ID.&#8217;&amp;echo=1&#8242;);<br />
      }</p>
<p>      if ($children) {<br />
   ?&gt;</p>
<p>   &lt;?php<br />
      } // End If Post<br />
} // End if is page</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pan X</title>
		<link>http://www.martin-gardner.co.uk/how-to-list-wordpress-child-pages-only-on-that-parent-page/comment-page-1/#comment-47180</link>
		<dc:creator>Pan X</dc:creator>
		<pubDate>Thu, 14 Apr 2011 11:46:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=1220#comment-47180</guid>
		<description>I got the same problem as Bob and it was cause its in the sidebar...
This solution works for me:
post-&gt;post_parent) {
        
        $children = wp_list_pages(&#039;sort_column=menu_order&amp;title_li=&amp;child_of=&#039;.$wp_query-&gt;post-&gt;post_parent.&#039;&amp;echo=1&#039;);
      }
      else {
        $children = wp_list_pages(&#039;sort_column=menu_order&amp;title_li=&amp;child_of=&#039;.$wp_query-&gt;post-&gt;ID.&#039;&amp;echo=1&#039;);
      }
      /*
      $page_id = $wp_query-&gt;post-&gt;ID;
      $children = wp_list_pages(&#039;sort_column=menu_order&amp;title_li=&amp;child_of=&#039;.$page_id.&#039;&amp;echo=0&#039;);
      */
      if ($children) {
   ?&gt;
      
        
        
        
      
   </description>
		<content:encoded><![CDATA[<p>I got the same problem as Bob and it was cause its in the sidebar&#8230;<br />
This solution works for me:<br />
post-&gt;post_parent) {</p>
<p>        $children = wp_list_pages(&#8216;sort_column=menu_order&amp;title_li=&amp;child_of=&#8217;.$wp_query-&gt;post-&gt;post_parent.&#8217;&amp;echo=1&#8242;);<br />
      }<br />
      else {<br />
        $children = wp_list_pages(&#8216;sort_column=menu_order&amp;title_li=&amp;child_of=&#8217;.$wp_query-&gt;post-&gt;ID.&#8217;&amp;echo=1&#8242;);<br />
      }<br />
      /*<br />
      $page_id = $wp_query-&gt;post-&gt;ID;<br />
      $children = wp_list_pages(&#8216;sort_column=menu_order&amp;title_li=&amp;child_of=&#8217;.$page_id.&#8217;&amp;echo=0&#8242;);<br />
      */<br />
      if ($children) {<br />
   ?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://www.martin-gardner.co.uk/how-to-list-wordpress-child-pages-only-on-that-parent-page/comment-page-1/#comment-47091</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Sun, 20 Mar 2011 12:26:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=1220#comment-47091</guid>
		<description>Hi Martin, I tried in the header file initially but didn&#039;t seem to work. I&#039;m using quite a complicated theme which would be why it won&#039;t work. I&#039;ll email you the site details throgh the contact form if that&#039;s ok?</description>
		<content:encoded><![CDATA[<p>Hi Martin, I tried in the header file initially but didn&#8217;t seem to work. I&#8217;m using quite a complicated theme which would be why it won&#8217;t work. I&#8217;ll email you the site details throgh the contact form if that&#8217;s ok?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marty</title>
		<link>http://www.martin-gardner.co.uk/how-to-list-wordpress-child-pages-only-on-that-parent-page/comment-page-1/#comment-47090</link>
		<dc:creator>Marty</dc:creator>
		<pubDate>Sat, 19 Mar 2011 21:10:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=1220#comment-47090</guid>
		<description>hi Pete,

i would really need to see your site, but normally, this code would be placed in your header.php file, just were you want it placed?</description>
		<content:encoded><![CDATA[<p>hi Pete,</p>
<p>i would really need to see your site, but normally, this code would be placed in your header.php file, just were you want it placed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: demon spin</title>
		<link>http://www.martin-gardner.co.uk/how-to-list-wordpress-child-pages-only-on-that-parent-page/comment-page-1/#comment-47035</link>
		<dc:creator>demon spin</dc:creator>
		<pubDate>Sun, 20 Feb 2011 16:59:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=1220#comment-47035</guid>
		<description>thanks for posting this. looking for this all day :D</description>
		<content:encoded><![CDATA[<p>thanks for posting this. looking for this all day :D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jorge Ledesma</title>
		<link>http://www.martin-gardner.co.uk/how-to-list-wordpress-child-pages-only-on-that-parent-page/comment-page-1/#comment-46968</link>
		<dc:creator>Jorge Ledesma</dc:creator>
		<pubDate>Sat, 29 Jan 2011 17:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=1220#comment-46968</guid>
		<description>Great post Marty.

I successfully integrated the most recent code from the comments and it works like a charm, slight issue though. When I click on a child, which are page posts essentially, it shows the list of child pages towards the bottom of the page. 

Is there any way for it to show only page itself.

ie. Go to my footer, click Journal and that takes you to the parent page called Journal Essays, then you&#039;ll see the children below as your code describes. Then click on any of those child pages and you&#039;ll enter those pages with all their corresponding information but towards the end it shows all the child pages of the Parent page.

My goal would be for the child pages not to have those entries in the bottom, so the reader essentially has to click Journal in the footer to enter the parent page.

Looking forward to your response. thanks,

regards,
JL</description>
		<content:encoded><![CDATA[<p>Great post Marty.</p>
<p>I successfully integrated the most recent code from the comments and it works like a charm, slight issue though. When I click on a child, which are page posts essentially, it shows the list of child pages towards the bottom of the page. </p>
<p>Is there any way for it to show only page itself.</p>
<p>ie. Go to my footer, click Journal and that takes you to the parent page called Journal Essays, then you&#8217;ll see the children below as your code describes. Then click on any of those child pages and you&#8217;ll enter those pages with all their corresponding information but towards the end it shows all the child pages of the Parent page.</p>
<p>My goal would be for the child pages not to have those entries in the bottom, so the reader essentially has to click Journal in the footer to enter the parent page.</p>
<p>Looking forward to your response. thanks,</p>
<p>regards,<br />
JL</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marty</title>
		<link>http://www.martin-gardner.co.uk/how-to-list-wordpress-child-pages-only-on-that-parent-page/comment-page-1/#comment-46948</link>
		<dc:creator>Marty</dc:creator>
		<pubDate>Tue, 25 Jan 2011 14:09:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=1220#comment-46948</guid>
		<description>hi Azukah, appologies, i edited the comment and lost your link :&#124;

to take the titles off just remove the bit in the code were it says title_li=
and leave that value blank, so just remove [php]&lt;h2&gt;More....&lt;/h2&gt;[/php]

also if you want to email a copy of your sidebar.php file I can edit the changes :)
marty@martin-gardner.co.uk</description>
		<content:encoded><![CDATA[<p>hi Azukah, appologies, i edited the comment and lost your link :|</p>
<p>to take the titles off just remove the bit in the code were it says title_li=<br />
and leave that value blank, so just remove
<pre class="brush: php; title: ; notranslate">&lt;h2&gt;More....&lt;/h2&gt;</pre>
<p>also if you want to email a copy of your sidebar.php file I can edit the changes :)<br />
<a href="mailto:marty@martin-gardner.co.uk">marty@martin-gardner.co.uk</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: azukah</title>
		<link>http://www.martin-gardner.co.uk/how-to-list-wordpress-child-pages-only-on-that-parent-page/comment-page-1/#comment-46947</link>
		<dc:creator>azukah</dc:creator>
		<pubDate>Tue, 25 Jan 2011 13:04:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=1220#comment-46947</guid>
		<description>Its an e-comm site xxx and Yes, please remove the link. I won&#039;t be using paypal or any e-payment. 

-- comment edited

I already tried to remove the titles. Didn&#039;t have much success.</description>
		<content:encoded><![CDATA[<p>Its an e-comm site xxx and Yes, please remove the link. I won&#8217;t be using paypal or any e-payment. </p>
<p>&#8211; comment edited</p>
<p>I already tried to remove the titles. Didn&#8217;t have much success.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marty</title>
		<link>http://www.martin-gardner.co.uk/how-to-list-wordpress-child-pages-only-on-that-parent-page/comment-page-1/#comment-46945</link>
		<dc:creator>Marty</dc:creator>
		<pubDate>Tue, 25 Jan 2011 11:57:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.martin-gardner.co.uk/?p=1220#comment-46945</guid>
		<description>good stuff.. :)

well to remove the More Categories and Sub Pages title..
just remove the call to them in the 
[php]
wp_list_categories(&#039;depth=2orderby=id&amp;title_li=&lt;h2&gt;More Categories&lt;/h2&gt;&amp;child_of=&#039;.$getParentCatId);
[/php]
so it reads just..
[php]
wp_list_categories(&#039;depth=2orderby=id&amp;title_li=&amp;child_of=&#039;.$getParentCatId); 
[/php]

As for the rest, do you have a link to your test site?
 
ill edit the comment to remove it, if you dont want it published?</description>
		<content:encoded><![CDATA[<p>good stuff.. :)</p>
<p>well to remove the More Categories and Sub Pages title..<br />
just remove the call to them in the </p>
<pre class="brush: php; title: ; notranslate">
wp_list_categories('depth=2orderby=id&amp;title_li=&lt;h2&gt;More Categories&lt;/h2&gt;&amp;child_of='.$getParentCatId);
</pre>
<p>so it reads just..</p>
<pre class="brush: php; title: ; notranslate">
wp_list_categories('depth=2orderby=id&amp;title_li=&amp;child_of='.$getParentCatId);
</pre>
<p>As for the rest, do you have a link to your test site?</p>
<p>ill edit the comment to remove it, if you dont want it published?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

