Title: Exclude Duplicate Post Code Not Working
Last modified: April 11, 2019

---

# Exclude Duplicate Post Code Not Working

 *  Resolved [Tnace](https://wordpress.org/support/users/radiocure1/)
 * (@radiocure1)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/exclude-duplicate-post-code-not-working/)
 * Hi Bill,
    Great plugin! I’ve worked through customizing the shortcode for our
   homepage. However, when I add the code from this page ([https://displayposts.com/2019/01/03/exclude-posts-already-displayed/](https://displayposts.com/2019/01/03/exclude-posts-already-displayed/))
   to our functions.php file to exclude duplicate posts it causes some issues. First
   of all, it stops the taxonomy filter from working and doesn’t appear to prevent
   duplicate posts. Any ideas why that is?
 * Secondly, Is there any way to display posts only in the past 2 weeks? I found
   this shortcode on your parameters page [display-posts date=”-1 year” date_compare
   =”>”]. Is the logic behind this to only show posts that are less than 1 year 
   old? I tried it but this broke the shortcode.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fexclude-duplicate-post-code-not-working%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Thread Starter [Tnace](https://wordpress.org/support/users/radiocure1/)
 * (@radiocure1)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/exclude-duplicate-post-code-not-working/#post-11440275)
 * Bill answered this via email so I’m marking it resolved

Viewing 1 replies (of 1 total)

The topic ‘Exclude Duplicate Post Code Not Working’ is closed to new replies.

 * ![](https://ps.w.org/display-posts-shortcode/assets/icon-256x256.jpg?rev=2940963)
 * [Display Posts - Easy lists, grids, navigation, and more](https://wordpress.org/plugins/display-posts-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/display-posts-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/display-posts-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-posts-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-posts-shortcode/reviews/)

## Tags

 * [duplicate posts](https://wordpress.org/support/topic-tag/duplicate-posts/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [weeks](https://wordpress.org/support/topic-tag/weeks/)

 * 1 reply
 * 1 participant
 * Last reply from: [Tnace](https://wordpress.org/support/users/radiocure1/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/exclude-duplicate-post-code-not-working/#post-11440275)
 * Status: resolved