<?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: WordPress: is_child function</title>
	<atom:link href="http://www.christianschenk.org/blog/wordpress-is_child-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christianschenk.org/blog/wordpress-is_child-function/</link>
	<description>Writing about my experiences with technology and all different kinds of projects and experiments</description>
	<lastBuildDate>Fri, 30 Jul 2010 04:19:58 +0200</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Christian Schenk</title>
		<link>http://www.christianschenk.org/blog/wordpress-is_child-function/comment-page-1/#comment-15089</link>
		<dc:creator>Christian Schenk</dc:creator>
		<pubDate>Sun, 18 Apr 2010 10:19:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.christianschenk.org/?p=735#comment-15089</guid>
		<description>Hi Chris,
this post was meant for programmers with a basic understanding of PHP and WordPress in general. I&#039;m sorry that this post isn&#039;t that clear for you but here&#039;s how to use the plugin:
&lt;ol&gt;
&lt;li&gt;install and activate the plugin. Note that this won&#039;t change your theme&#039;s &lt;code&gt;functions.php&lt;/code&gt; in any way.&lt;/li&gt;
&lt;li&gt;use the function &lt;code&gt;is_child&lt;/code&gt; where ever you want to make sure that the current post/page is a descendant of the given parent post/page.&lt;/li&gt;
&lt;/ol&gt;
Say, you&#039;ve got a page with the ID 4711 and another page with the ID 4712 where the latter is a child page of the first one. The function call &lt;code&gt;is_child(4711)&lt;/code&gt; will evaluate to true if you&#039;re requesting any of this page&#039;s sub pages, e.g. the one with the ID 4712.</description>
		<content:encoded><![CDATA[<p>Hi Chris,<br />
this post was meant for programmers with a basic understanding of PHP and WordPress in general. I&#8217;m sorry that this post isn&#8217;t that clear for you but here&#8217;s how to use the plugin:</p>
<ol>
<li>install and activate the plugin. Note that this won&#8217;t change your theme&#8217;s <code>functions.php</code> in any way.</li>
<li>use the function <code>is_child</code> where ever you want to make sure that the current post/page is a descendant of the given parent post/page.</li>
</ol>
<p>Say, you&#8217;ve got a page with the ID 4711 and another page with the ID 4712 where the latter is a child page of the first one. The function call <code>is_child(4711)</code> will evaluate to true if you&#8217;re requesting any of this page&#8217;s sub pages, e.g. the one with the ID 4712.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.christianschenk.org/blog/wordpress-is_child-function/comment-page-1/#comment-15066</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 16 Apr 2010 20:50:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.christianschenk.org/?p=735#comment-15066</guid>
		<description>How about a little help with this plug-in....
Can you spell it out. Step 123...

Do I need to add this...  

function is_child($parent) {
  global $post;
  return $post-&gt;post_parent == $parent;
}

to my functions.php or not? I&#039;ve seen it implemented around the web &quot;Most of the time it’s something like the following:&quot; not clear!

can you give an example of how to call this function would it be added to the (list item) of the subpage or to the (list item) that holds the subpages? not clear

Installing this plug-in didn&#039;t seem to change my themes functions.php was it supost to? help!</description>
		<content:encoded><![CDATA[<p>How about a little help with this plug-in&#8230;.<br />
Can you spell it out. Step 123&#8230;</p>
<p>Do I need to add this&#8230;  </p>
<p>function is_child($parent) {<br />
  global $post;<br />
  return $post-&gt;post_parent == $parent;<br />
}</p>
<p>to my functions.php or not? I&#8217;ve seen it implemented around the web &#8220;Most of the time it’s something like the following:&#8221; not clear!</p>
<p>can you give an example of how to call this function would it be added to the (list item) of the subpage or to the (list item) that holds the subpages? not clear</p>
<p>Installing this plug-in didn&#8217;t seem to change my themes functions.php was it supost to? help!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
