<?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: Pages &amp; Subpages &#8211; Is Parent?</title>
	<atom:link href="http://wpengineer.com/921/pages-subpages-is-parent/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpengineer.com/921/pages-subpages-is-parent/</link>
	<description>WordPress News, Hacks, Tips, Tutorials, Plugins and Themes</description>
	<lastBuildDate>Tue, 22 May 2012 12:01:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: HealthMatters &#124; Round WordPress: Summer of Code, Kubrick Retired, How Tos, WebWare 100, and WordPress Fan Blogs</title>
		<link>http://wpengineer.com/921/pages-subpages-is-parent/#comment-1102</link>
		<dc:creator>HealthMatters &#124; Round WordPress: Summer of Code, Kubrick Retired, How Tos, WebWare 100, and WordPress Fan Blogs</dc:creator>
		<pubDate>Sun, 10 May 2009 08:02:09 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=921#comment-1102</guid>
		<description>[...] Pages &amp; Subpages &#8211; Is Parent? [...]</description>
		<content:encoded><![CDATA[<p>[...] Pages &amp; Subpages &#8211; Is Parent? [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://wpengineer.com/921/pages-subpages-is-parent/#comment-1084</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Sun, 03 May 2009 22:37:35 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=921#comment-1084</guid>
		<description>I just had to put together a function to find the topmost parent of a page - using your function as a template, here&#039;s what I came up with:

function get_topmost_parent($post_id){
  $parent_id = get_post($post_id)-&gt;post_parent;
  if($parent_id == 0){
    return $post_id;
  }else{
    return get_topmost_parent($parent_id);
  }
}</description>
		<content:encoded><![CDATA[<p>I just had to put together a function to find the topmost parent of a page - using your function as a template, here's what I came up with:</p>
<p>function get_topmost_parent($post_id){<br />
  $parent_id = get_post($post_id)-&gt;post_parent;<br />
  if($parent_id == 0){<br />
    return $post_id;<br />
  }else{<br />
    return get_topmost_parent($parent_id);<br />
  }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Kahoun</title>
		<link>http://wpengineer.com/921/pages-subpages-is-parent/#comment-1032</link>
		<dc:creator>Peter Kahoun</dc:creator>
		<pubDate>Mon, 20 Apr 2009 13:12:46 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=921#comment-1032</guid>
		<description>Very nice function. IMHO, why not to eliminate one parameter by mod. like this:

&lt;code&gt;
function has_parent($post_id,  $post = false) {
  if ($post === false) global $post;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Very nice function. IMHO, why not to eliminate one parameter by mod. like this:</p>
<p><code><br />
function has_parent($post_id,  $post = false) {<br />
  if ($post === false) global $post;<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://wpengineer.com/921/pages-subpages-is-parent/#comment-913</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 30 Mar 2009 14:22:34 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=921#comment-913</guid>
		<description>I&#039;ve often had to do this when I put together a theme for a client who wants a CMS style site, but I&#039;ve never come up with anything as elegant of the has_parent function!

I was about to comment on the fact that you were missing situations where the child was actually a grandchild - but it turns out it was just pretty enough that I missed it.

I&#039;d never seen a really solid practical example of  recursion until now.    Brilliant.</description>
		<content:encoded><![CDATA[<p>I've often had to do this when I put together a theme for a client who wants a CMS style site, but I've never come up with anything as elegant of the has_parent function!</p>
<p>I was about to comment on the fact that you were missing situations where the child was actually a grandchild - but it turns out it was just pretty enough that I missed it.</p>
<p>I'd never seen a really solid practical example of  recursion until now.    Brilliant.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

