<?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 for Mark Leong Web Development &amp; Design</title>
	<atom:link href="http://www.mark-leong.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mark-leong.com</link>
	<description>Freelance Web Development &#38; Design</description>
	<lastBuildDate>Wed, 22 Feb 2012 20:05:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on WordPress hack: Force wp_list_pages() to print current_page_item class by Richard</title>
		<link>http://www.mark-leong.com/wordpress-hack-force-wp_list_pages-to-print-current_page_item-class/#comment-101</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Wed, 22 Feb 2012 20:05:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.markyleong.com/?p=870#comment-101</guid>
		<description>Awesome mate, thanks for sharing this. Just what I was looking for and saved me some time!</description>
		<content:encoded><![CDATA[<p>Awesome mate, thanks for sharing this. Just what I was looking for and saved me some time!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Set WordPress custom post types order in admin by JL</title>
		<link>http://www.mark-leong.com/set-wordpress-custom-post-types-order-in-admin/#comment-87</link>
		<dc:creator>JL</dc:creator>
		<pubDate>Wed, 08 Feb 2012 19:56:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.markyleong.com/?p=864#comment-87</guid>
		<description>Thanks man!</description>
		<content:encoded><![CDATA[<p>Thanks man!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Set WordPress custom post types order in admin by Wes</title>
		<link>http://www.mark-leong.com/set-wordpress-custom-post-types-order-in-admin/#comment-86</link>
		<dc:creator>Wes</dc:creator>
		<pubDate>Wed, 08 Feb 2012 17:23:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.markyleong.com/?p=864#comment-86</guid>
		<description>Thanks for this, it was just what I was looking for.

I&#039;d like to add some code to solve a problem I had:

Add &lt;code&gt;!isset($_GET[&#039;orderby&#039;])&lt;/code&gt; before the set function to prevent the filter from overriding the sort order when you explicitly ask (eg. clicking on the post author or post date).

My function then becomes

&lt;code&gt;function app_list_admin_order($query) {
	if (is_admin()) {
		$post_type = $query-&gt;query[&#039;post_type&#039;];
		if ($post_type = &#039;custom_post_type&#039;) {
			if (!isset($_GET[&#039;orderby&#039;])) {
				$query-&gt;set(&#039;orderby&#039;, &#039;title&#039;);
				$query-&gt;set(&#039;order&#039;, &#039;asc&#039;);
			}
		}		
	}
}&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for this, it was just what I was looking for.</p>
<p>I&#8217;d like to add some code to solve a problem I had:</p>
<p>Add <code>!isset($_GET['orderby'])</code> before the set function to prevent the filter from overriding the sort order when you explicitly ask (eg. clicking on the post author or post date).</p>
<p>My function then becomes</p>
<p><code>function app_list_admin_order($query) {<br />
	if (is_admin()) {<br />
		$post_type = $query-&gt;query['post_type'];<br />
		if ($post_type = 'custom_post_type') {<br />
			if (!isset($_GET['orderby'])) {<br />
				$query-&gt;set('orderby', 'title');<br />
				$query-&gt;set('order', 'asc');<br />
			}<br />
		}<br />
	}<br />
}</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WordPress hack: Force wp_list_pages() to print current_page_item class by Robert</title>
		<link>http://www.mark-leong.com/wordpress-hack-force-wp_list_pages-to-print-current_page_item-class/#comment-81</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Tue, 06 Dec 2011 09:23:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.markyleong.com/?p=870#comment-81</guid>
		<description>Thanks a lot for that Post!</description>
		<content:encoded><![CDATA[<p>Thanks a lot for that Post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WordPress hack: Force wp_list_pages() to print current_page_item class by Coliq</title>
		<link>http://www.mark-leong.com/wordpress-hack-force-wp_list_pages-to-print-current_page_item-class/#comment-80</link>
		<dc:creator>Coliq</dc:creator>
		<pubDate>Fri, 28 Oct 2011 14:26:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.markyleong.com/?p=870#comment-80</guid>
		<description>sorry, just left important note.

call wp_list_pages using echo=0, and save to variable. 
$somevar = wp_list_pages(&#039;title_li&amp;echo=0&#039;);</description>
		<content:encoded><![CDATA[<p>sorry, just left important note.</p>
<p>call wp_list_pages using echo=0, and save to variable.<br />
$somevar = wp_list_pages(&#8216;title_li&amp;echo=0&#8242;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WordPress hack: Force wp_list_pages() to print current_page_item class by Coliq</title>
		<link>http://www.mark-leong.com/wordpress-hack-force-wp_list_pages-to-print-current_page_item-class/#comment-79</link>
		<dc:creator>Coliq</dc:creator>
		<pubDate>Fri, 28 Oct 2011 14:23:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.markyleong.com/?p=870#comment-79</guid>
		<description>Your idea is brilliant, but i don&#039;t know why i can&#039;t implement it.
but i found another way with simple code.

just call wp_list_pages() before call query or else 
best case is after get_header();

Thanks!</description>
		<content:encoded><![CDATA[<p>Your idea is brilliant, but i don&#8217;t know why i can&#8217;t implement it.<br />
but i found another way with simple code.</p>
<p>just call wp_list_pages() before call query or else<br />
best case is after get_header();</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WordPress hack: Force wp_list_pages() to print current_page_item class by Matt</title>
		<link>http://www.mark-leong.com/wordpress-hack-force-wp_list_pages-to-print-current_page_item-class/#comment-78</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Tue, 18 Oct 2011 21:25:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.markyleong.com/?p=870#comment-78</guid>
		<description>To make this work for an archive page, you also need a $wp_query-&gt;queried_object = &#039;&#039;; under line 10.</description>
		<content:encoded><![CDATA[<p>To make this work for an archive page, you also need a $wp_query-&gt;queried_object = &#8221;; under line 10.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Set WordPress custom post types order in admin by Sam</title>
		<link>http://www.mark-leong.com/set-wordpress-custom-post-types-order-in-admin/#comment-77</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Tue, 04 Oct 2011 18:56:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.markyleong.com/?p=864#comment-77</guid>
		<description>Thanks, Mark! This is exactly what I was looking for. It seems like such a common need for custom post types I&#039;m surprised there&#039;s no option to set this during the registration process.</description>
		<content:encoded><![CDATA[<p>Thanks, Mark! This is exactly what I was looking for. It seems like such a common need for custom post types I&#8217;m surprised there&#8217;s no option to set this during the registration process.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Set WordPress custom post types order in admin by Thibaut</title>
		<link>http://www.mark-leong.com/set-wordpress-custom-post-types-order-in-admin/#comment-76</link>
		<dc:creator>Thibaut</dc:creator>
		<pubDate>Fri, 30 Sep 2011 13:15:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.markyleong.com/?p=864#comment-76</guid>
		<description>In fact your could just set  &#039;hierarchical&#039; to &quot;true&quot; in the register_post_type declaration.</description>
		<content:encoded><![CDATA[<p>In fact your could just set  &#8216;hierarchical&#8217; to &#8220;true&#8221; in the register_post_type declaration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WordPress hack: Force wp_list_pages() to print current_page_item class by Cyrille</title>
		<link>http://www.mark-leong.com/wordpress-hack-force-wp_list_pages-to-print-current_page_item-class/#comment-75</link>
		<dc:creator>Cyrille</dc:creator>
		<pubDate>Wed, 28 Sep 2011 09:52:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.markyleong.com/?p=870#comment-75</guid>
		<description>Thanks! it made my day!</description>
		<content:encoded><![CDATA[<p>Thanks! it made my day!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

