<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Themocracy WordPress Themes &#187; Themes</title>
	<atom:link href="http://themocracy.com/tag/themes/feed/" rel="self" type="application/rss+xml" />
	<link>http://themocracy.com</link>
	<description>WordPress Theme Design</description>
	<lastBuildDate>Mon, 26 Jul 2010 06:18:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Multiple WordPress Queries &#8211; Duplicates</title>
		<link>http://themocracy.com/2010/01/multiple-wordpress-queries-duplicates/</link>
		<comments>http://themocracy.com/2010/01/multiple-wordpress-queries-duplicates/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 19:26:04 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Themes]]></category>

		<guid isPermaLink="false">http://themocracy.com/?p=197</guid>
		<description><![CDATA[You&#8217;ve got 2,3,4&#8230; custom post queries on a page and you need to get some control over duplicates &#8211; it looks unprofessional if your theme keeps showing the same stuff. Let&#8217;s take the example of displaying separately posts from 2 different categories &#8211; but if a post is in both categories, not duplicated across the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthemocracy.com%2F2010%2F01%2Fmultiple-wordpress-queries-duplicates%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthemocracy.com%2F2010%2F01%2Fmultiple-wordpress-queries-duplicates%2F" height="61" width="51" /></a></div><p><strong>You&#8217;ve got 2,3,4&#8230; custom post queries on a page and you need to get some control over duplicates</strong> &#8211; it looks unprofessional if your theme keeps showing the same stuff. Let&#8217;s take the example of displaying separately posts from 2 different categories &#8211; but if a post is in both categories, not duplicated across the lists.</p>
<p>The process is fairly simple:- 2 custom queries, but we catch a list of the post_ids as we loop through the first query, ready for their exclusion from the second.<br />
<span id="more-197"></span></p>
<pre class="brush: php">
	// declare the duplicates array - good practice
	$duplicates = array(); 

	$args = array(&#039;cat&#039; =&gt; &#039;5&#039;, &#039;showposts&#039;=&gt; &#039;10&#039;);
	$customQuery = new WP_Query($args);

	if($customQuery-&gt;have_posts()){
		while ($customQuery-&gt;have_posts()){

			$customQuery-&gt;the_post();

			//here&#039;s where we catch the ids
			$duplicates[] = $post-&gt;ID; 

			//do something with the postdata, display it etc.
		}
	}
</pre>
<p>The <strong>post__not_in</strong> parameter of a WP_Query takes an array &#8211; which is kinda useful, since an array is just what we&#8217;ve got &#8211; never say WordPress developers aren&#8217;t on the ball&#8230;.  Don&#8217;t forget, it still needs to be an array, even if you&#8217;re only passing one value. So if we continue&#8230;. </p>
<pre class="brush: php">
	$args = array(&#039;cat&#039; =&gt; &#039;6&#039;, &#039;showposts&#039;=&gt; &#039;10&#039;, &#039;post__not_in&#039; =&gt; $duplicates);
	$customQuery2 = new WP_Query($args);
		if($customQuery2-&gt;have_posts()){
	// etc etc
</pre>
<p>Another obvious application is in displaying a query of featured (category) posts and then not duplicating these posts in the later display of latest posts &#8211; a common trope in the average theme index page nowadays&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://themocracy.com/2010/01/multiple-wordpress-queries-duplicates/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Persephone &#8211; Free WordPress Theme</title>
		<link>http://themocracy.com/2009/08/persephone-free-wordpress-theme/</link>
		<comments>http://themocracy.com/2009/08/persephone-free-wordpress-theme/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 13:56:53 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[Free]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[persephone]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://themocracy.com/?p=163</guid>
		<description><![CDATA[Persephone is a free WordPress theme, two-column, with a right sidebar, compatible with WordPress version 2.7 upwards, and all ready for paged and threaded comments. 3 styles to choose from, good old blue, red, green&#8230; Version 1.1 has been tested on Firefox 2,3, Internet Explorer 7 and 8, Chrome, Opera 9. Features Twitter badge link [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthemocracy.com%2F2009%2F08%2Fpersephone-free-wordpress-theme%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthemocracy.com%2F2009%2F08%2Fpersephone-free-wordpress-theme%2F" height="61" width="51" /></a></div><p><img src="http://themocracy.com/wp-content/uploads/2009/08/persephone-wordpress-theme.jpg" alt="persephone-wordpress-theme" title="persephone-wordpress-theme" width="339" height="240" class="alignright size-full wp-image-164" /><strong>Persephone</strong> is a free WordPress theme, two-column, with a right sidebar, compatible with WordPress version 2.7 upwards, and all ready for paged and threaded comments. 3 styles to choose from, good old blue, red, green&#8230;</p>
<p>Version 1.1 has been tested on Firefox 2,3, Internet Explorer 7 and 8, Chrome, Opera 9.</p>
<p><strong>Features</strong></p>
<ul>
<li>Twitter badge link</li>
<li>Add your own logo image in header</li>
<li>Horizontal page menu &#8211; configure order and exclude for top-level pages</li>
<li>Custom RSS links &#8211; add your Feedburner url from the admin</li>
</ul>
<p><strong>Demo:</strong> <a href="http://themocracy.com/demo/?t=6">Persephone demo</a> </p>
<p><strong>Download</strong>: Persephone WordPress Theme v1.1 &#8211; <a href="http://themocracy.com/extra/themes/persephone.zip">persephone.zip</a></p>
<p>Our free themes are supplied “as is” – <em>sorry, but we don’t have the resources to offer support for enquiries about individual installation/customisation</em>. You’re free to use and modify them as you wish, but we would ask you to retain the credit link in the footer.</p>
]]></content:encoded>
			<wfw:commentRss>http://themocracy.com/2009/08/persephone-free-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

