<?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: Get Post Title Outside &#8220;The Loop&#8221;</title>
	<atom:link href="http://mywordpress.com/get-post-title-outside-the-loop/feed/" rel="self" type="application/rss+xml" />
	<link>http://mywordpress.com/get-post-title-outside-the-loop/</link>
	<description>Clever WordPress Plugins!</description>
	<lastBuildDate>Mon, 08 Mar 2010 20:49:23 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: myWordPress</title>
		<link>http://mywordpress.com/get-post-title-outside-the-loop/#comment-617</link>
		<dc:creator>myWordPress</dc:creator>
		<pubDate>Tue, 17 Nov 2009 19:55:33 +0000</pubDate>
		<guid isPermaLink="false">http://mywordpress.com/?p=980#comment-617</guid>
		<description>Hi Dave

&quot;The loop&quot; refers to the process WP makes (code-wise) in displaying content to the visitors. In terms of Plugin development, you usually work either outside or inside &quot;the loop&quot;.

If you want to learn more about &quot;the loop&quot;, take a look here: http://www.themelab.com/2008/04/04/the-ultimate-guide-to-the-wordpress-loop/</description>
		<content:encoded><![CDATA[<p>Hi Dave</p>
<p>&#8220;The loop&#8221; refers to the process WP makes (code-wise) in displaying content to the visitors. In terms of Plugin development, you usually work either outside or inside &#8220;the loop&#8221;.</p>
<p>If you want to learn more about &#8220;the loop&#8221;, take a look here: <a  href="http://www.themelab.com/2008/04/04/the-ultimate-guide-to-the-wordpress-loop/" rel="nofollow">http://www.themelab.com/2008/04/04/the-ultimate-guide-to-the-wordpress-loop/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave L</title>
		<link>http://mywordpress.com/get-post-title-outside-the-loop/#comment-610</link>
		<dc:creator>Dave L</dc:creator>
		<pubDate>Sun, 15 Nov 2009 15:08:48 +0000</pubDate>
		<guid isPermaLink="false">http://mywordpress.com/?p=980#comment-610</guid>
		<description>I am sorry but what is this supposed to do?  &quot;outside the loop&quot; of what exactly?</description>
		<content:encoded><![CDATA[<p>I am sorry but what is this supposed to do?  &#8220;outside the loop&#8221; of what exactly?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: myWordPress</title>
		<link>http://mywordpress.com/get-post-title-outside-the-loop/#comment-590</link>
		<dc:creator>myWordPress</dc:creator>
		<pubDate>Wed, 04 Nov 2009 17:13:36 +0000</pubDate>
		<guid isPermaLink="false">http://mywordpress.com/?p=980#comment-590</guid>
		<description>150 down to less than 10? That is what I call improvement! :-)</description>
		<content:encoded><![CDATA[<p>150 down to less than 10? That is what I call improvement! <img src='http://mywordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Milan Petrovic</title>
		<link>http://mywordpress.com/get-post-title-outside-the-loop/#comment-587</link>
		<dc:creator>Milan Petrovic</dc:creator>
		<pubDate>Wed, 04 Nov 2009 14:16:19 +0000</pubDate>
		<guid isPermaLink="false">http://mywordpress.com/?p=980#comment-587</guid>
		<description>If the post is already cached it will be faster to use get_post, also get_post will cache post if it is not already. Also, such simple queries are fast do execute. But I try to avoid such coding because it is easier to do, but later is much more complicated to change and clean up.

Since I spend a lot of time optimizing GD Star Rating plugin and adding various caching methods, I have measured all kinds of things, and the conclusion is that the best thing is to have less DB queries. They are very fast, but take into the account total number of queries executed, and it&#039;s best to find the way to minimize that. GD Star Rating pre 1.5 versions needed some 150 queries for 10 posts because it was executing queries as they were needed. Now it needs less then 10 queries for the same 10 posts.
.-= Milan Petrovic&#180;s last blog ..&lt;a href=&quot;http://feedproxy.google.com/~r/dev4press/~3/peICT0CjLEY/&quot; rel=&quot;nofollow&quot;&gt;New website res4WP.com&lt;/a&gt; =-.</description>
		<content:encoded><![CDATA[<p>If the post is already cached it will be faster to use get_post, also get_post will cache post if it is not already. Also, such simple queries are fast do execute. But I try to avoid such coding because it is easier to do, but later is much more complicated to change and clean up.</p>
<p>Since I spend a lot of time optimizing GD Star Rating plugin and adding various caching methods, I have measured all kinds of things, and the conclusion is that the best thing is to have less DB queries. They are very fast, but take into the account total number of queries executed, and it&#8217;s best to find the way to minimize that. GD Star Rating pre 1.5 versions needed some 150 queries for 10 posts because it was executing queries as they were needed. Now it needs less then 10 queries for the same 10 posts.<br />
.-= Milan Petrovic&#180;s last blog ..<a  href="http://feedproxy.google.com/~r/dev4press/~3/peICT0CjLEY/" rel="nofollow">New website res4WP.com</a> =-.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: myWordPress</title>
		<link>http://mywordpress.com/get-post-title-outside-the-loop/#comment-586</link>
		<dc:creator>myWordPress</dc:creator>
		<pubDate>Wed, 04 Nov 2009 14:02:21 +0000</pubDate>
		<guid isPermaLink="false">http://mywordpress.com/?p=980#comment-586</guid>
		<description>Hi Milan

Thank you for that function! That does indeed make it a lot easier, and as you say, if its already in the cache it is much faster. In cases where a lot of posts could be queried it would be good.

One note however, if in cases where you are only interested in for instance the title of a range of posts, would it not be faster to use my original query solution, modified to only return the title from the database, or would get_post() still be better/faster?

Thank you for adding valuable insights to my ramblings! :-)</description>
		<content:encoded><![CDATA[<p>Hi Milan</p>
<p>Thank you for that function! That does indeed make it a lot easier, and as you say, if its already in the cache it is much faster. In cases where a lot of posts could be queried it would be good.</p>
<p>One note however, if in cases where you are only interested in for instance the title of a range of posts, would it not be faster to use my original query solution, modified to only return the title from the database, or would get_post() still be better/faster?</p>
<p>Thank you for adding valuable insights to my ramblings! <img src='http://mywordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Milan Petrovic</title>
		<link>http://mywordpress.com/get-post-title-outside-the-loop/#comment-585</link>
		<dc:creator>Milan Petrovic</dc:creator>
		<pubDate>Wed, 04 Nov 2009 10:37:17 +0000</pubDate>
		<guid isPermaLink="false">http://mywordpress.com/?p=980#comment-585</guid>
		<description>This is actually not the best method for this. Much better is to use WordPress function:

$postdata = get_post($postid);

This function uses internal WordPress object cache, and if the post you need is already in the cache you save on running unneeded query. Object is the same as with your method and all returned properties the same.
.-= Milan Petrovic&#180;s last blog ..&lt;a href=&quot;http://feedproxy.google.com/~r/dev4press/~3/peICT0CjLEY/&quot; rel=&quot;nofollow&quot;&gt;New website res4WP.com&lt;/a&gt; =-.</description>
		<content:encoded><![CDATA[<p>This is actually not the best method for this. Much better is to use WordPress function:</p>
<p>$postdata = get_post($postid);</p>
<p>This function uses internal WordPress object cache, and if the post you need is already in the cache you save on running unneeded query. Object is the same as with your method and all returned properties the same.<br />
.-= Milan Petrovic&#180;s last blog ..<a  href="http://feedproxy.google.com/~r/dev4press/~3/peICT0CjLEY/" rel="nofollow">New website res4WP.com</a> =-.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
