<?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: List pages in wordpress into a PHP Array</title>
	<atom:link href="http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/feed/" rel="self" type="application/rss+xml" />
	<link>http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/</link>
	<description>Brendan Nee Online</description>
	<lastBuildDate>Fri, 30 Jul 2010 21:17:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Joost</title>
		<link>http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/comment-page-1/#comment-11458</link>
		<dc:creator>Joost</dc:creator>
		<pubDate>Mon, 20 Jul 2009 16:16:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.bnee.com/?p=161#comment-11458</guid>
		<description>Isn&#039;t this what &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_pages&quot; rel=&quot;nofollow&quot;&gt;get_pages()&lt;/a&gt; is for?

$pages = get_pages(&#039;child_of&#039; =&gt; [[THE PARENT ID]], &#039;sort_order&#039; =&gt; &#039;ASC&#039;); 
foreach ($pages as $page) {
  // Do your thang
}</description>
		<content:encoded><![CDATA[<p>Isn&#8217;t this what <a href="http://codex.wordpress.org/Function_Reference/get_pages" rel="nofollow">get_pages()</a> is for?</p>
<p>$pages = get_pages(&#8216;child_of&#8217; =&gt; [[THE PARENT ID]], &#8216;sort_order&#8217; =&gt; &#8216;ASC&#8217;);<br />
foreach ($pages as $page) {<br />
  // Do your thang<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will Anderson</title>
		<link>http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/comment-page-1/#comment-10851</link>
		<dc:creator>Will Anderson</dc:creator>
		<pubDate>Thu, 18 Sep 2008 16:21:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.bnee.com/?p=161#comment-10851</guid>
		<description>Hi,
I too feel that the wp_list_pages function leaves something to be desired. I went about fixing it in another way though. the wp_list_pages function uses another function called get_pages which returns a list of page IDs. Using that, you can retrieve the post name and it&#039;s URL. The place I found this useful was in an implementation of an expanding page list for a client. doing it with wp_list_pages would have been next to impossible, but using the get_pages function, it was almost trivial.

The reason I suggest using this over a database call is that the database call can easily be broken in a later release if the database schema changes. On the other hand, as long as the get_pages function remains consistent, a later version won&#039;t break the code.

Anyway, those are just my ideas on maintainability. Using database calls will work, I just wouldn&#039;t suggest it when there&#039;s an alternative.

Will</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I too feel that the wp_list_pages function leaves something to be desired. I went about fixing it in another way though. the wp_list_pages function uses another function called get_pages which returns a list of page IDs. Using that, you can retrieve the post name and it&#8217;s URL. The place I found this useful was in an implementation of an expanding page list for a client. doing it with wp_list_pages would have been next to impossible, but using the get_pages function, it was almost trivial.</p>
<p>The reason I suggest using this over a database call is that the database call can easily be broken in a later release if the database schema changes. On the other hand, as long as the get_pages function remains consistent, a later version won&#8217;t break the code.</p>
<p>Anyway, those are just my ideas on maintainability. Using database calls will work, I just wouldn&#8217;t suggest it when there&#8217;s an alternative.</p>
<p>Will</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dyasonhat</title>
		<link>http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/comment-page-1/#comment-10849</link>
		<dc:creator>Dyasonhat</dc:creator>
		<pubDate>Thu, 11 Sep 2008 19:48:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.bnee.com/?p=161#comment-10849</guid>
		<description>Thanks, working great!</description>
		<content:encoded><![CDATA[<p>Thanks, working great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thanxer</title>
		<link>http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/comment-page-1/#comment-10810</link>
		<dc:creator>Thanxer</dc:creator>
		<pubDate>Thu, 31 Jul 2008 11:49:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.bnee.com/?p=161#comment-10810</guid>
		<description>Thanks bud, You saved my Time.
I was Looking in wp_list_pages without result!</description>
		<content:encoded><![CDATA[<p>Thanks bud, You saved my Time.<br />
I was Looking in wp_list_pages without result!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pangeran</title>
		<link>http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/comment-page-1/#comment-10809</link>
		<dc:creator>Pangeran</dc:creator>
		<pubDate>Mon, 28 Jul 2008 02:05:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.bnee.com/?p=161#comment-10809</guid>
		<description>Oh?
Thanks anyway...
I just use non dynamic html for now...</description>
		<content:encoded><![CDATA[<p>Oh?<br />
Thanks anyway&#8230;<br />
I just use non dynamic html for now&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brendan Nee</title>
		<link>http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/comment-page-1/#comment-10808</link>
		<dc:creator>Brendan Nee</dc:creator>
		<pubDate>Mon, 28 Jul 2008 01:38:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.bnee.com/?p=161#comment-10808</guid>
		<description>I haven&#039;t checked this with wordpress version 2.6 yet, let me know if you figure this out.</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t checked this with wordpress version 2.6 yet, let me know if you figure this out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pangeran</title>
		<link>http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/comment-page-1/#comment-10807</link>
		<dc:creator>Pangeran</dc:creator>
		<pubDate>Mon, 28 Jul 2008 01:19:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.bnee.com/?p=161#comment-10807</guid>
		<description>I&#039;ve tried that(Removed AND $wpdb-&gt;posts.post_parent = [[Parent Page ID]] )
And I&#039;ve tried to put page id inside like this [[1 2 2 34]]

Both not working...

I am using WordPress 2.6
And using OPTION theme by Justin Tadlock to intergrate this...</description>
		<content:encoded><![CDATA[<p>I&#8217;ve tried that(Removed AND $wpdb-&gt;posts.post_parent = [[Parent Page ID]] )<br />
And I&#8217;ve tried to put page id inside like this [[1 2 2 34]]</p>
<p>Both not working&#8230;</p>
<p>I am using WordPress 2.6<br />
And using OPTION theme by Justin Tadlock to intergrate this&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brendan Nee</title>
		<link>http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/comment-page-1/#comment-10806</link>
		<dc:creator>Brendan Nee</dc:creator>
		<pubDate>Sun, 27 Jul 2008 20:34:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.bnee.com/?p=161#comment-10806</guid>
		<description>If you wanted to return a list including all published pages, just remove the section:

AND $wpdb-&gt;posts.post_parent = [[Parent Page ID]] 

entirely.</description>
		<content:encoded><![CDATA[<p>If you wanted to return a list including all published pages, just remove the section:</p>
<p>AND $wpdb->posts.post_parent = [[Parent Page ID]] </p>
<p>entirely.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pangeran</title>
		<link>http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/comment-page-1/#comment-10805</link>
		<dc:creator>Pangeran</dc:creator>
		<pubDate>Sun, 27 Jul 2008 12:40:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.bnee.com/?p=161#comment-10805</guid>
		<description>Thanks for this code.

But how to remove the [[Parent Page ID]] .
I want all pages is listed.

I just want to add [b] before the [a]</description>
		<content:encoded><![CDATA[<p>Thanks for this code.</p>
<p>But how to remove the [[Parent Page ID]] .<br />
I want all pages is listed.</p>
<p>I just want to add [b] before the [a]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
