<?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: Make sense of WordPress query functions</title>
	<atom:link href="http://www.rarst.net/script/wordpress-query-functions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rarst.net/script/wordpress-query-functions/</link>
	<description>cynical thoughts on software and web</description>
	<lastBuildDate>Tue, 22 May 2012 09:35:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Rarst</title>
		<link>http://www.rarst.net/script/wordpress-query-functions/#comment-99498</link>
		<dc:creator>Rarst</dc:creator>
		<pubDate>Sat, 14 May 2011 13:05:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarst.net/?p=2200#comment-99498</guid>
		<description>&lt;a href=&quot;#comment-99497&quot;&gt;&lt;strong&gt;@kaiser&lt;/strong&gt;&lt;/a&gt;

Yep, but practice shows people commonly don&#039;t have a clue about WP_Error, how to catch it and what to do with it. Also it isn&#039;t returned consistently, same function can return that or something else on error under different conditions.

&lt;blockquote&gt;Why don’t you use threaded comments? Haven’t ever seen a reply in the style you use it over here before.&lt;/blockquote&gt;

Custom made. :) I am not a huge fan of threaded comments, they tend to add a mess instead of solving it. I will probably revisit it when I get to updating the theme.</description>
		<content:encoded><![CDATA[<p><a href="#comment-99497"><strong>@kaiser</strong></a></p>
<p>Yep, but practice shows people commonly don&#8217;t have a clue about WP_Error, how to catch it and what to do with it. Also it isn&#8217;t returned consistently, same function can return that or something else on error under different conditions.</p>
<blockquote><p>Why don’t you use threaded comments? Haven’t ever seen a reply in the style you use it over here before.</p></blockquote>
<p>Custom made. :) I am not a huge fan of threaded comments, they tend to add a mess instead of solving it. I will probably revisit it when I get to updating the theme.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kaiser</title>
		<link>http://www.rarst.net/script/wordpress-query-functions/#comment-99497</link>
		<dc:creator>kaiser</dc:creator>
		<pubDate>Sat, 14 May 2011 12:59:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarst.net/?p=2200#comment-99497</guid>
		<description>&lt;a href=&quot;#comment-98983&quot;&gt;&lt;strong&gt;@Rarst&lt;/strong&gt;&lt;/a&gt;

But afaik the error class is there since a much longer time... ;)

Btw: Why don&#039;t you use threaded comments? Haven&#039;t ever seen a reply in the style you use it over here before.</description>
		<content:encoded><![CDATA[<p><a href="#comment-98983"><strong>@Rarst</strong></a></p>
<p>But afaik the error class is there since a much longer time&#8230; ;)</p>
<p>Btw: Why don&#8217;t you use threaded comments? Haven&#8217;t ever seen a reply in the style you use it over here before.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rarst</title>
		<link>http://www.rarst.net/script/wordpress-query-functions/#comment-98983</link>
		<dc:creator>Rarst</dc:creator>
		<pubDate>Thu, 12 May 2011 19:06:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarst.net/?p=2200#comment-98983</guid>
		<description>&lt;a href=&quot;#comment-98981&quot;&gt;&lt;strong&gt;@kaiser&lt;/strong&gt;&lt;/a&gt;

&lt;em&gt;_doing_it_wrong&lt;/em&gt; is very recent addition (WP 3.1), I hadn&#039;t even seen mentions of it yet - stumbled on it by chance in source several days ago.

So hopefully it will see more use in the future.</description>
		<content:encoded><![CDATA[<p><a href="#comment-98981"><strong>@kaiser</strong></a></p>
<p><em>_doing_it_wrong</em> is very recent addition (WP 3.1), I hadn&#8217;t even seen mentions of it yet &#8211; stumbled on it by chance in source several days ago.</p>
<p>So hopefully it will see more use in the future.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kaiser</title>
		<link>http://www.rarst.net/script/wordpress-query-functions/#comment-98981</link>
		<dc:creator>kaiser</dc:creator>
		<pubDate>Thu, 12 May 2011 18:56:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarst.net/?p=2200#comment-98981</guid>
		<description>One thing i really can&#039;t understand: Why wordpress devs *never* make use of the error object to help people. I don&#039;t know how often I&#039;ve read the following sentence from &quot;Otto&quot;, who&#039;s in the core dev team: &quot;Then you&#039;re doing it wrong(tm)&quot;. I tend to say that I must have done something wrong, if the user couldn&#039;t do it right. If you take a look at one of my plugins &lt;a href=&quot;https://github.com/franz-josef-kaiser/Easy-Pagination-Deamon/blob/master/pagination.class.php&quot;&gt;&quot;easy pagination deamon&quot;&lt;/a&gt;, then you&#039;ll find the function &quot;help()&quot; inside the class that notifies the user if the template tag wasn&#039;t placed right. It makes me close to angry, because i know there&#039;s - aside from the error class - another useful function inside core: &quot;_doing_it_wrong( $function, $message, $version )&quot; - /core-root/wp-includes/functions.php...</description>
		<content:encoded><![CDATA[<p>One thing i really can&#8217;t understand: Why wordpress devs *never* make use of the error object to help people. I don&#8217;t know how often I&#8217;ve read the following sentence from &#8220;Otto&#8221;, who&#8217;s in the core dev team: &#8220;Then you&#8217;re doing it wrong(tm)&#8221;. I tend to say that I must have done something wrong, if the user couldn&#8217;t do it right. If you take a look at one of my plugins <a href="https://github.com/franz-josef-kaiser/Easy-Pagination-Deamon/blob/master/pagination.class.php">&#8220;easy pagination deamon&#8221;</a>, then you&#8217;ll find the function &#8220;help()&#8221; inside the class that notifies the user if the template tag wasn&#8217;t placed right. It makes me close to angry, because i know there&#8217;s &#8211; aside from the error class &#8211; another useful function inside core: &#8220;_doing_it_wrong( $function, $message, $version )&#8221; &#8211; /core-root/wp-includes/functions.php&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcko</title>
		<link>http://www.rarst.net/script/wordpress-query-functions/#comment-93064</link>
		<dc:creator>Marcko</dc:creator>
		<pubDate>Sat, 23 Apr 2011 23:06:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarst.net/?p=2200#comment-93064</guid>
		<description>&lt;strong&gt;Thank you for this overview&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p><strong>Thank you for this overview</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rarst</title>
		<link>http://www.rarst.net/script/wordpress-query-functions/#comment-89189</link>
		<dc:creator>Rarst</dc:creator>
		<pubDate>Wed, 13 Apr 2011 23:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarst.net/?p=2200#comment-89189</guid>
		<description>&lt;a href=&quot;#comment-89187&quot;&gt;&lt;strong&gt;@finchamgroves&lt;/strong&gt;&lt;/a&gt;

Entirely different functions. 

wp_reset_postdata() restores (or at least tries to) global $post variable to original post.

rewind_posts() resets internal query counter (for example if you want to loop through same set of posts twice).</description>
		<content:encoded><![CDATA[<p><a href="#comment-89187"><strong>@finchamgroves</strong></a></p>
<p>Entirely different functions. </p>
<p>wp_reset_postdata() restores (or at least tries to) global $post variable to original post.</p>
<p>rewind_posts() resets internal query counter (for example if you want to loop through same set of posts twice).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: finchamgroves</title>
		<link>http://www.rarst.net/script/wordpress-query-functions/#comment-89187</link>
		<dc:creator>finchamgroves</dc:creator>
		<pubDate>Wed, 13 Apr 2011 23:12:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarst.net/?p=2200#comment-89187</guid>
		<description>Is there a difference between wp_reset_postdata() and rewind_posts()  ?
It&#039;s hard to find a comparison in the codex.</description>
		<content:encoded><![CDATA[<p>Is there a difference between wp_reset_postdata() and rewind_posts()  ?<br />
It&#8217;s hard to find a comparison in the codex.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rarst</title>
		<link>http://www.rarst.net/script/wordpress-query-functions/#comment-88913</link>
		<dc:creator>Rarst</dc:creator>
		<pubDate>Tue, 12 Apr 2011 16:15:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarst.net/?p=2200#comment-88913</guid>
		<description>&lt;a href=&quot;#comment-88909&quot;&gt;&lt;strong&gt;@finchamgroves&lt;/strong&gt;&lt;/a&gt;

No problem. :) And I highly recommend http://wordpress.stackexchange.com/ if you want to seriously improve your WordPress skills.</description>
		<content:encoded><![CDATA[<p><a href="#comment-88909"><strong>@finchamgroves</strong></a></p>
<p>No problem. :) And I highly recommend <a href="http://wordpress.stackexchange.com/">http://wordpress.stackexchange.com/</a> if you want to seriously improve your WordPress skills.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: finchamgroves</title>
		<link>http://www.rarst.net/script/wordpress-query-functions/#comment-88909</link>
		<dc:creator>finchamgroves</dc:creator>
		<pubDate>Tue, 12 Apr 2011 16:00:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarst.net/?p=2200#comment-88909</guid>
		<description>&lt;a href=&quot;#comment-88895&quot;&gt;&lt;strong&gt;@Rarst&lt;/strong&gt;&lt;/a&gt;

Many thanks. (It slows me down no end but I hate just using stuff without questioning why!)</description>
		<content:encoded><![CDATA[<p><a href="#comment-88895"><strong>@Rarst</strong></a></p>
<p>Many thanks. (It slows me down no end but I hate just using stuff without questioning why!)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rarst</title>
		<link>http://www.rarst.net/script/wordpress-query-functions/#comment-88895</link>
		<dc:creator>Rarst</dc:creator>
		<pubDate>Tue, 12 Apr 2011 14:45:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarst.net/?p=2200#comment-88895</guid>
		<description>&lt;a href=&quot;#comment-88866&quot;&gt;&lt;strong&gt;@finchamgroves&lt;/strong&gt;&lt;/a&gt;

Yep, that is fine. Like &lt;code&gt;$some_variable = new WP_Query();&lt;/code&gt; or &lt;code&gt;$some_variable = new WP_Query($some_query_arguments);&lt;/code&gt;

&lt;blockquote&gt;Some people seem to use this and I’m not sure why&lt;/blockquote&gt;

Because they probably want to change main Loop temporarily for some reason, but don&#039;t have a clue how to use &lt;em&gt;query_posts()&lt;/em&gt; and &lt;em&gt;wp_reset_query()&lt;/em&gt;. Which they should be using, instead of that contraption.</description>
		<content:encoded><![CDATA[<p><a href="#comment-88866"><strong>@finchamgroves</strong></a></p>
<p>Yep, that is fine. Like <code>$some_variable = new WP_Query();</code> or <code>$some_variable = new WP_Query($some_query_arguments);</code></p>
<blockquote><p>Some people seem to use this and I’m not sure why</p></blockquote>
<p>Because they probably want to change main Loop temporarily for some reason, but don&#8217;t have a clue how to use <em>query_posts()</em> and <em>wp_reset_query()</em>. Which they should be using, instead of that contraption.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

