Title: wp_query returning duplicates
Last modified: August 20, 2016

---

# wp_query returning duplicates

 *  [thelanj](https://wordpress.org/support/users/thelanj/)
 * (@thelanj)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_query-returning-duplicates/)
 * Going a little nuts over this one:
 * About a month or so ago all instances of WP_QUERY on my site started malfunctioning.
   The query works, but always returns the exact same results for the first and 
   last entry of the query.
 * Whether I’m limiting the query to 3 posts or 100, and no matter what I sort by,
   the first and last results are a duplicate.
 * This is running on a fairly complex site with lots of plugins, customizations,
   and Wishlist Member. It’s a very live site so I’d like to avoid publically switching
   templates or turning off plugins to figure out whats up.
 * Anyhone have any ideas for how I might troubleshoot this with as little interruption
   as possibly?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [deepbevel](https://wordpress.org/support/users/deepbevel/)
 * (@deepbevel)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_query-returning-duplicates/#post-2564441)
 * [http://codex.wordpress.org/Running_a_Development_Copy_of_WordPress](http://codex.wordpress.org/Running_a_Development_Copy_of_WordPress)
   
   [http://codex.wordpress.org/Changing_The_Site_URL](http://codex.wordpress.org/Changing_The_Site_URL)
 *  [deepbevel](https://wordpress.org/support/users/deepbevel/)
 * (@deepbevel)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_query-returning-duplicates/#post-2564442)
 * Don’t know if this pertains, but I had an odity where a function I added to change
   the posts order caused my queries to brake, showing wrong categories and tags.
   I had to add the posts order to each argument instead of using a global function.
 *  [dandy-wp](https://wordpress.org/support/users/dandy-wp/)
 * (@dandy-wp)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_query-returning-duplicates/#post-2564636)
 * I am having the exact issue. My WP_query is returning 1st and last entries as
   same result. [@thelanj](https://wordpress.org/support/users/thelanj/) any solution/
   suggestion?
 * Best Regards.
 *  [deepbevel](https://wordpress.org/support/users/deepbevel/)
 * (@deepbevel)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_query-returning-duplicates/#post-2564639)
 * If it’s not a new function or a plugin or theme, If it continues to be an issue
   you might try query_posts or GET posts. It would be good to know if it’s just
   happening with WP_Query.
 *  Thread Starter [thelanj](https://wordpress.org/support/users/thelanj/)
 * (@thelanj)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_query-returning-duplicates/#post-2564641)
 * Hi, thanks everyone.
 * Upon further research I found a thread on the wishlist member forums with postings
   from a bunch of other users having the same problem. So its a bug on their end.
 * Thanks!
 *  [dandy-wp](https://wordpress.org/support/users/dandy-wp/)
 * (@dandy-wp)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_query-returning-duplicates/#post-2564643)
 * but i am not even using WishList Member 😐 . I’ll try with query_posts().
 *  Thread Starter [thelanj](https://wordpress.org/support/users/thelanj/)
 * (@thelanj)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_query-returning-duplicates/#post-2564644)
 * despite my issue being plugin related, i can say it was just WP_QUERY causing
   the issue. reset post data and using query_posts was effective as a workaround
 *  [dandy-wp](https://wordpress.org/support/users/dandy-wp/)
 * (@dandy-wp)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_query-returning-duplicates/#post-2564678)
 * just found that some other guy had installed wishlist member. So issue is indeed
   specific to WishList Member only.
 *  [dandy-wp](https://wordpress.org/support/users/dandy-wp/)
 * (@dandy-wp)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_query-returning-duplicates/#post-2564682)
 * okay I found a weird workaround.
 * a call to query_posts() before WP_query() solves the problem. 😐

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘wp_query returning duplicates’ is closed to new replies.

## Tags

 * [wp_query](https://wordpress.org/support/topic-tag/wp_query/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 3 participants
 * Last reply from: [dandy-wp](https://wordpress.org/support/users/dandy-wp/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/wp_query-returning-duplicates/#post-2564682)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
