<?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: Show total number of search results in your WordPress search&#160;template</title>
	<atom:link href="http://theandystratton.com/2009/show-total-search-results-wordpress-search-template/feed" rel="self" type="application/rss+xml" />
	<link>http://theandystratton.com/2009/show-total-search-results-wordpress-search-template</link>
	<description>WordPress and PHP Developer</description>
	<lastBuildDate>Thu, 26 Jan 2012 17:22:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: andy</title>
		<link>http://theandystratton.com/2009/show-total-search-results-wordpress-search-template/comment-page-1#comment-364</link>
		<dc:creator>andy</dc:creator>
		<pubDate>Tue, 28 Sep 2010 17:07:54 +0000</pubDate>
		<guid isPermaLink="false">http://theandystratton.com/?p=163#comment-364</guid>
		<description>@Maria and @Morten – you should be able ot use @Oncle Tom&#039;s contribution and use the &lt;code&gt;found_posts&lt;/code&gt; property from the global &lt;code&gt;$wp_query&lt;/code&gt; object:

&lt;pre&gt;&lt;code&gt;global $wp_query;
query_posts(&quot;tag=$tagname&quot;);
echo $wp_query-&gt;found_posts . &#039; post(s) found for &#039;. $tagname;&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@Maria and @Morten – you should be able ot use @Oncle Tom&#8217;s contribution and use the <code>found_posts</code> property from the global <code>$wp_query</code> object:</p>
<pre><code>global $wp_query;
query_posts("tag=$tagname");
echo $wp_query->found_posts . ' post(s) found for '. $tagname;</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Morten</title>
		<link>http://theandystratton.com/2009/show-total-search-results-wordpress-search-template/comment-page-1#comment-363</link>
		<dc:creator>Morten</dc:creator>
		<pubDate>Tue, 28 Sep 2010 16:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://theandystratton.com/?p=163#comment-363</guid>
		<description>Would love to know the answer to Marias question about tags...

Best
M</description>
		<content:encoded><![CDATA[<p>Would love to know the answer to Marias question about tags&#8230;</p>
<p>Best<br />
M</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andy</title>
		<link>http://theandystratton.com/2009/show-total-search-results-wordpress-search-template/comment-page-1#comment-220</link>
		<dc:creator>andy</dc:creator>
		<pubDate>Sun, 23 May 2010 16:37:16 +0000</pubDate>
		<guid isPermaLink="false">http://theandystratton.com/?p=163#comment-220</guid>
		<description>@Oncle Tom -- that&#039;s even better, thanks!</description>
		<content:encoded><![CDATA[<p>@Oncle Tom &#8212; that&#8217;s even better, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oncle Tom</title>
		<link>http://theandystratton.com/2009/show-total-search-results-wordpress-search-template/comment-page-1#comment-219</link>
		<dc:creator>Oncle Tom</dc:creator>
		<pubDate>Sun, 23 May 2010 12:24:48 +0000</pubDate>
		<guid isPermaLink="false">http://theandystratton.com/?p=163#comment-219</guid>
		<description>Even simpler: &lt;code&gt;&lt;?php global $wp_query; echo $wp_query-&gt;found_posts ?&gt; results for the search &#8216;&lt;?php the_search_query() ?&gt;&#8217;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Even simpler: <code>&lt;?php global $wp_query; echo $wp_query-&gt;found_posts ?&gt; results for the search &#8216;&lt;?php the_search_query() ?&gt;&#8217;</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maria</title>
		<link>http://theandystratton.com/2009/show-total-search-results-wordpress-search-template/comment-page-1#comment-168</link>
		<dc:creator>Maria</dc:creator>
		<pubDate>Thu, 25 Mar 2010 16:31:19 +0000</pubDate>
		<guid isPermaLink="false">http://theandystratton.com/?p=163#comment-168</guid>
		<description>I&#039;m trying to count the number of posts with a particular tag and I&#039;m using the following code:

query(&#039;tag=TAGNAME&#039;); 
 echo &#039;TAGNAME: &#039; . $my_query-&gt;post_count .&#039;&#039;;
                 wp_reset_query(); ?&gt;

I&#039;ve tried adding your code in, in various permutations, but I keep getting out either the total number of posts, or the total posts per page each time when the counts are more than the number of posts allowed per page.

Do you have any suggestions here?

- Maria</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to count the number of posts with a particular tag and I&#8217;m using the following code:</p>
<p>query(&#8216;tag=TAGNAME&#8217;);<br />
 echo &#8216;TAGNAME: &#8216; . $my_query-&gt;post_count .&#8221;;<br />
                 wp_reset_query(); ?&gt;</p>
<p>I&#8217;ve tried adding your code in, in various permutations, but I keep getting out either the total number of posts, or the total posts per page each time when the counts are more than the number of posts allowed per page.</p>
<p>Do you have any suggestions here?</p>
<p>- Maria</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zoinks! Graphics</title>
		<link>http://theandystratton.com/2009/show-total-search-results-wordpress-search-template/comment-page-1#comment-106</link>
		<dc:creator>Zoinks! Graphics</dc:creator>
		<pubDate>Wed, 28 Oct 2009 02:43:21 +0000</pubDate>
		<guid isPermaLink="false">http://theandystratton.com/?p=163#comment-106</guid>
		<description>Thanks for sharing. I use it to limit whether or not the navigation links display to save page space. This works great!!</description>
		<content:encoded><![CDATA[<p>Thanks for sharing. I use it to limit whether or not the navigation links display to save page space. This works great!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reino</title>
		<link>http://theandystratton.com/2009/show-total-search-results-wordpress-search-template/comment-page-1#comment-95</link>
		<dc:creator>Reino</dc:creator>
		<pubDate>Thu, 01 Oct 2009 08:08:54 +0000</pubDate>
		<guid isPermaLink="false">http://theandystratton.com/?p=163#comment-95</guid>
		<description>Great post! Works for me!</description>
		<content:encoded><![CDATA[<p>Great post! Works for me!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jermaine Maree</title>
		<link>http://theandystratton.com/2009/show-total-search-results-wordpress-search-template/comment-page-1#comment-91</link>
		<dc:creator>Jermaine Maree</dc:creator>
		<pubDate>Tue, 08 Sep 2009 16:06:15 +0000</pubDate>
		<guid isPermaLink="false">http://theandystratton.com/?p=163#comment-91</guid>
		<description>This really came in handy! Was having a similar issue, but it was displaying total posts instead. The posts_per_page=-1 fixed the issue :D Thanks!</description>
		<content:encoded><![CDATA[<p>This really came in handy! Was having a similar issue, but it was displaying total posts instead. The posts_per_page=-1 fixed the issue <img src='http://theandystratton.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

