Title: Get WP_Query to return duplicate posts
Last modified: August 21, 2016

---

# Get WP_Query to return duplicate posts

 *  [runslow](https://wordpress.org/support/users/runslow/)
 * (@runslow)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/get-wp_query-to-return-duplicate-posts/)
 * Howdie,
 * I cannot for my life figure out how to get wordpress to return duplicate posts
   using WP_Query. It always removes the duplicate post. Im getting the posts by
   id’s. Within an array there may be multiple duplicate id’s. I need to do this
   to display the same post twice within a loop because they have different meta
   values. Here is my code:
 *     ```
       $post_ids = array(10, 245, 78, 15,  245, 10); //something like that 245 is in there twice.
   
       $args = array(
           'post__in' => $post_ids,
           'post_type' => 'sfd_products'
       );
   
       $the_query = new WP_Query($args);
   
       while ($the_query->have_posts()) : $the_query->the_post();
       	//post stuff
       endwhile;
       ```
   
 * Everything works correctly, but postid 245 only shows once. I want it to loop
   twice. Is this possible? The only other way I can think is make multiple queries
   with smaller chunks of arrays that do not have duplicates. I really don’t want
   to go that route.
 * Thanks in advance.

The topic ‘Get WP_Query to return duplicate posts’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [runslow](https://wordpress.org/support/users/runslow/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/get-wp_query-to-return-duplicate-posts/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
