<?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: Filter Duplicate Posts in the Loop</title>
	<atom:link href="http://wpengineer.com/1719/filter-duplicate-posts-in-the-loop/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpengineer.com/1719/filter-duplicate-posts-in-the-loop/</link>
	<description>WordPress News, Hacks, Tips, Tutorials, Plugins and Themes</description>
	<lastBuildDate>Wed, 08 Feb 2012 19:48:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Web Design Auckland</title>
		<link>http://wpengineer.com/1719/filter-duplicate-posts-in-the-loop/#comment-8282</link>
		<dc:creator>Web Design Auckland</dc:creator>
		<pubDate>Sun, 24 Apr 2011 13:50:12 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=1719#comment-8282</guid>
		<description>This doesn&#039;t work for me. According to the codex query_posts shouldn&#039;t be used to create a second loop. But rather a new loop should be started via WP_Query</description>
		<content:encoded><![CDATA[<p>This doesn't work for me. According to the codex query_posts shouldn't be used to create a second loop. But rather a new loop should be started via WP_Query</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Legenda</title>
		<link>http://wpengineer.com/1719/filter-duplicate-posts-in-the-loop/#comment-4510</link>
		<dc:creator>Legenda</dc:creator>
		<pubDate>Thu, 17 Jun 2010 02:56:28 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=1719#comment-4510</guid>
		<description>Thanks.. I been looking for this code and found out that your solution is simple and better than other.. Tested 3 loop in same file.. not sure working in different file..</description>
		<content:encoded><![CDATA[<p>Thanks.. I been looking for this code and found out that your solution is simple and better than other.. Tested 3 loop in same file.. not sure working in different file..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gian</title>
		<link>http://wpengineer.com/1719/filter-duplicate-posts-in-the-loop/#comment-4365</link>
		<dc:creator>Gian</dc:creator>
		<pubDate>Fri, 21 May 2010 15:24:27 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=1719#comment-4365</guid>
		<description>Does this work even if each loop is in a different template file? Or they need to be in the same one?

Becasue I got 2 loops in two template files (header and sidebar) and can&#039;t get it NOT to duplicate.</description>
		<content:encoded><![CDATA[<p>Does this work even if each loop is in a different template file? Or they need to be in the same one?</p>
<p>Becasue I got 2 loops in two template files (header and sidebar) and can't get it NOT to duplicate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yeeloon</title>
		<link>http://wpengineer.com/1719/filter-duplicate-posts-in-the-loop/#comment-3800</link>
		<dc:creator>yeeloon</dc:creator>
		<pubDate>Wed, 31 Mar 2010 08:22:12 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=1719#comment-3800</guid>
		<description>Sorry.. here&#039;s the code below. Remove the &#039;&lt;!--&#039; and &#039;--&gt;&#039;.

query(
array(&#039;category__and&#039;=&gt;array(64,112), &#039;showposts&#039;=&gt;1, &#039;&amp;paged&#039; =&gt; $paged));
? --&gt;

&lt;!-- ?php while ($wp_query-&gt;have_posts()) : $wp_query-&gt;the_post(); ? --&gt;
	&lt;a href=&quot;&lt;!-- ?php the_permalink() ? --&gt;&quot; rel=&quot;bookmark&quot;&gt;&lt;!-- ?php the_title(); ? --&gt;&lt;/a&gt;
&lt;!-- ?php endwhile; ? --&gt;


  &lt;!-- ?php previous_posts_link(&#039;&#171; Previous&#039;) ? --&gt;
  &lt;!-- ?php next_posts_link(&#039;Next &#187;&#039;) ? --&gt;

&lt;!-- ?php $wp_query = null; $wp_query = $temp;? --&gt;</description>
		<content:encoded><![CDATA[<p>Sorry.. here's the code below. Remove the '<!--' and '-->'.</p>
<p>query(<br />
array('category__and'=&gt;array(64,112), 'showposts'=&gt;1, '&amp;paged' =&gt; $paged));<br />
? --&gt;</p>
<p><!-- ?php while ($wp_query-&gt;have_posts()) : $wp_query-&gt;the_post(); ? --><br />
	&lt;a href=&quot;<!-- ?php the_permalink() ? -->" rel="bookmark"&gt;<!-- ?php the_title(); ? --><br />
<!-- ?php endwhile; ? --></p>
<p>  <!-- ?php previous_posts_link('&laquo; Previous') ? --><br />
  <!-- ?php next_posts_link('Next &raquo;') ? --></p>
<p><!-- ?php $wp_query = null; $wp_query = $temp;? --></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yeeloon</title>
		<link>http://wpengineer.com/1719/filter-duplicate-posts-in-the-loop/#comment-3799</link>
		<dc:creator>yeeloon</dc:creator>
		<pubDate>Wed, 31 Mar 2010 08:18:39 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=1719#comment-3799</guid>
		<description>Hi there... I just stumbled your post after lotsa googling around.. See below if you can help me out - cross posted on (http://wordpress.org/support/topic/382340?replies=1)


I need some help on the following. Basically, I have 2 different categories called &#039;Deals &amp; Offers&#039; and &#039;San Francisco&#039; where by each categories has several posts under them.

Now, I&#039;m trying to create a category/page called &#039;Deals &amp; Offers in San Francisco&#039;, whereby the page will query and show posts (assuming there are 20 posts under both these categories) that are categorized in &#039;Deals &amp; Offers&#039; and &#039;San Francisco&#039;. This category/page will have its own navigation of Next and Previous links when it exceeds more than 5 posts.

I applied the code below, but everytime I clicked on the Previous/Next button, it keep showing the most recent 5 posts (categorized under Deals &amp; Offers and San Francisco)... :(

How can I possibly show the other remaining 15 posts when I click thru the Next link? Any advice or help would be very much appreciated.. as I have been googling hign and low for this solution, and it seems like nobody has tackle this before?

Thanks again!

&lt;code&gt;
?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query-&gt;query(
array(&#039;category__and&#039;=&gt;array(64,112), &#039;showposts&#039;=&gt;1, &#039;&amp;paged&#039; =&gt; $paged));
?&gt;

have_posts()) : $wp_query-&gt;the_post(); ?&gt;
	&lt;a href=&quot;&quot; rel=&quot;bookmark&quot;&gt;&lt;/a&gt;



  
  


&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi there... I just stumbled your post after lotsa googling around.. See below if you can help me out - cross posted on (<a href="http://wordpress.org/support/topic/382340?replies=1" rel="nofollow">http://wordpress.org/support/topic/382340?replies=1</a>)</p>
<p>I need some help on the following. Basically, I have 2 different categories called 'Deals &amp; Offers' and 'San Francisco' where by each categories has several posts under them.</p>
<p>Now, I'm trying to create a category/page called 'Deals &amp; Offers in San Francisco', whereby the page will query and show posts (assuming there are 20 posts under both these categories) that are categorized in 'Deals &amp; Offers' and 'San Francisco'. This category/page will have its own navigation of Next and Previous links when it exceeds more than 5 posts.</p>
<p>I applied the code below, but everytime I clicked on the Previous/Next button, it keep showing the most recent 5 posts (categorized under Deals &amp; Offers and San Francisco)... <img src='http://wpengineer.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>How can I possibly show the other remaining 15 posts when I click thru the Next link? Any advice or help would be very much appreciated.. as I have been googling hign and low for this solution, and it seems like nobody has tackle this before?</p>
<p>Thanks again!</p>
<p><code><br />
?php<br />
$temp = $wp_query;<br />
$wp_query= null;<br />
$wp_query = new WP_Query();<br />
$wp_query-&gt;query(<br />
array('category__and'=&gt;array(64,112), 'showposts'=&gt;1, '&amp;paged' =&gt; $paged));<br />
?&gt;</code></p>
<p>have_posts()) : $wp_query-&gt;the_post(); ?&gt;<br />
	&lt;a href=&quot;" rel="bookmark"&gt;</p>
<p></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alt Design</title>
		<link>http://wpengineer.com/1719/filter-duplicate-posts-in-the-loop/#comment-3569</link>
		<dc:creator>Alt Design</dc:creator>
		<pubDate>Tue, 23 Feb 2010 16:10:42 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=1719#comment-3569</guid>
		<description>Hi, nice hacks... but what happens to the pagination (eg. wp_navi plugin)?</description>
		<content:encoded><![CDATA[<p>Hi, nice hacks... but what happens to the pagination (eg. wp_navi plugin)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: designerDru</title>
		<link>http://wpengineer.com/1719/filter-duplicate-posts-in-the-loop/#comment-2003</link>
		<dc:creator>designerDru</dc:creator>
		<pubDate>Sat, 14 Nov 2009 00:20:43 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=1719#comment-2003</guid>
		<description>This is exactly what I&#039;ve been looking for: 3 separate loops, the first displays the modt recent then sets a $do_not_duplicate to that ID.

The 2nd loop grabs 6 posts from a specific category, &amp; should not dupe the post from the first loop.

The 3rd loop grabs 6 posts from a different specific category, &amp; should also not dupe the post from the first loop.

but no love from the code... If I pass it along would you be willing to take a look?</description>
		<content:encoded><![CDATA[<p>This is exactly what I've been looking for: 3 separate loops, the first displays the modt recent then sets a $do_not_duplicate to that ID.</p>
<p>The 2nd loop grabs 6 posts from a specific category, &amp; should not dupe the post from the first loop.</p>
<p>The 3rd loop grabs 6 posts from a different specific category, &amp; should also not dupe the post from the first loop.</p>
<p>but no love from the code... If I pass it along would you be willing to take a look?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Banago</title>
		<link>http://wpengineer.com/1719/filter-duplicate-posts-in-the-loop/#comment-1826</link>
		<dc:creator>Banago</dc:creator>
		<pubDate>Sun, 04 Oct 2009 22:02:07 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=1719#comment-1826</guid>
		<description>Very nice way to work around it. I have been using another approach, but I like this one and I think I will start to use it. Thanks for sharing it!</description>
		<content:encoded><![CDATA[<p>Very nice way to work around it. I have been using another approach, but I like this one and I think I will start to use it. Thanks for sharing it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evita el contenido duplicado en tus Loops &#124; Eliseos.net</title>
		<link>http://wpengineer.com/1719/filter-duplicate-posts-in-the-loop/#comment-1817</link>
		<dc:creator>Evita el contenido duplicado en tus Loops &#124; Eliseos.net</dc:creator>
		<pubDate>Thu, 01 Oct 2009 00:11:26 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=1719#comment-1817</guid>
		<description>[...] en tus Loops. lo cual es bueno para SEO y evitar problemas de validación en ciertos casos.Visto en WpEngineerCompartir:Sponsors Squares.set_spacing(5, 5); Squares.show_squares(1,2); Relacionado             [...]</description>
		<content:encoded><![CDATA[<p>[...] en tus Loops. lo cual es bueno para SEO y evitar problemas de validación en ciertos casos.Visto en WpEngineerCompartir:Sponsors Squares.set_spacing(5, 5); Squares.show_squares(1,2); Relacionado             [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

