<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>SemiProBlogging &#187; PHP</title>
	<atom:link href="http://semiproblogging.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://semiproblogging.com</link>
	<description>Blogging for extra money and fun</description>
	<lastBuildDate>Wed, 02 Apr 2008 22:26:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- podcast_generator="podPress/8.8" -->
		<copyright>&#xA9; </copyright>
		<managingEditor>wyliemac@gmail.com ()</managingEditor>
		<webMaster>wyliemac@gmail.com()</webMaster>
		<category></category>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>Blogging for extra money and fun</itunes:summary>
		<itunes:author></itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name></itunes:name>
			<itunes:email>wyliemac@gmail.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://semiproblogging.com/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://semiproblogging.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>SemiProBlogging</title>
			<link>http://semiproblogging.com</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>How to automatically generate a page list within a WordPress page or post</title>
		<link>http://semiproblogging.com/how-to-automatically-generate-a-page-list-within-a-wordpress-page-or-post/</link>
		<comments>http://semiproblogging.com/how-to-automatically-generate-a-page-list-within-a-wordpress-page-or-post/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 04:03:40 +0000</pubDate>
		<dc:creator>wyliemac</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[The Man]]></category>

		<guid isPermaLink="false">http://semiproblogging.com/how-to-automatically-generate-a-page-list-within-a-wordpress-page-or-post/</guid>
		<description><![CDATA[ I am not a coder. But I am a do it yourselfer. And with all my blogs, I either find out how to write code to accomplish a specific task, or I find a plugin. And this post is a bit of both.
First, take a look at my post regarding the addition of aerial [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "How to automatically generate a page list within a WordPress page or post", url: "http://semiproblogging.com/how-to-automatically-generate-a-page-list-within-a-wordpress-page-or-post/" });</script>]]></description>
			<content:encoded><![CDATA[<p><img src="http://semiproblogging.com/wp-content/uploads/2008/02/the-man-plugins.jpg" alt="If WordPress were a guy he would be The Man - Plugins" align="left" hspace="10" /> I am not a coder. But I am a do it yourselfer. And with all my blogs, I either find out how to write code to accomplish a specific task, or I find a plugin. And this post is a bit of both.</p>
<p>First, take a look at <a href="http://the270.com/2008/03/12/adding-golf-courses-to-the270/">my post regarding the addition of aerial golf course maps</a> on my <a href="http://the270.com">Columbus, Ohio centric blog the270</a>.</p>
<p>At the end of my narrative, you will find a list of golf courses added to the blog. The list is automatic. That is, as I continue to add aerial golf course maps, WordPress automatically includes those maps to the list. I don&#8217;t have to go back and manually code the list.</p>
<h4>First Create a Parent Page</h4>
<p><img src="http://semiproblogging.com/wp-content/uploads/2008/03/writepage.jpg" alt="Write Page" /></p>
<p>The first step in how I accomplished this was to create a page called &#8220;Golf&#8221;. To do, go to the Write Page tab and create a page with the Page Title &#8220;Golf&#8221;.</p>
<h4>Next create Child pages</h4>
<p><img src="http://semiproblogging.com/wp-content/uploads/2008/03/parentpage.jpg" alt="Parent Page" /></p>
<p>After I created the Golf page, which appears as  http://the270.com/golf/, I created individual pages with the Golf course as the name of the page. In the right hand sidebar, goto the Page Parent field and select &#8220;Golf&#8221; as the parent page. Of course, your parent page will differ according to the name of your page.</p>
<h4>The PHP code needed to display the &#8220;child&#8221; pages in alphabetical order</h4>
<p>Next I did inserted the following PHP code in the text &#8220;code&#8221; field of my post.</p>
<p>&lt;ul&gt;<br />
&lt;?php wp_list_pages(&#8217;child_of=63&amp;sort_column=post_title&amp;title_li=&amp;depth=1&#8242;) ?&gt;<br />
&lt;/ul&gt;<br />
The number &#8220;63&#8243; of the above code corresponds to the ID code of the &#8220;Golf&#8221; page that I created. To determine the ID number of your page, goto the Manage &gt; Pages tabs and search for your page title. The ID number will be to the left.</p>
<p><img src="http://semiproblogging.com/wp-content/uploads/2008/03/id.jpg" alt="ID" /><br />
In the example above, the &#8220;Golf Club of Dublin&#8221; post is a child of the &#8220;Golf&#8221; post. Hypothetically, I could have created another page with the &#8220;Golf Club of Dublin&#8221; being the parent. In this hypothetical, that post would be I guess the grandchild of the &#8220;Golf&#8221; post. I would not want to display the grandchild pages in my list. So to exclude grandchildren, you set the depth as 1 in the PHP code above.</p>
<p>But we are not yet finished.</p>
<h4>Plugin to run PHP code within WordPress pages or posts</h4>
<p><img src="http://semiproblogging.com/wp-content/uploads/2008/03/runphp.jpg" alt="runPHP" align="left" hspace="10" />If I stopped with the above and published the post, the list would not have generated. That&#8217;s because WordPress ignores PHP code within posts or pages. That&#8217;s where the plugin <a href="http://www.nosq.com/blog/runphp/">runPHP</a> comes in handy. After you activate this plugin, you can insert PHP code within your posts or pages, and they will work.</p>
<p>In the right sidebar, all you need to do is make sure there is a check mark in the box next to the words &#8220;run PHP code?&#8221;</p>
<p>After that, just publish and let WordPress and PHP run its magic.</p>
<p><a href="http://sharethis.com/item?&wp=2.8.6&amp;publisher=ad4f4fc7-96c0-41ee-b62d-3f43821044d1&amp;title=How+to+automatically+generate+a+page+list+within+a+WordPress+page+or+post&amp;url=http%3A%2F%2Fsemiproblogging.com%2Fhow-to-automatically-generate-a-page-list-within-a-wordpress-page-or-post%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://semiproblogging.com/how-to-automatically-generate-a-page-list-within-a-wordpress-page-or-post/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
