Title: [Plugin: Posts 2 Posts] Related posts showing multiple times
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] Related posts showing multiple times

 *  [tamlyn](https://wordpress.org/support/users/tamlyn/)
 * (@tamlyn)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-related-posts-showing-multiple-times/)
 * I’ve got a reciprocal many-to-many connection between news stories and programmes
   and I’m using get_related to show related news stories on the programme pages
   but also on the news pages (i.e. other news related to the same programmes).
 * It works great except that news stories which are connected to two programmes
   are returned twice in the query. I presumably that’s because it sees them as 
   being related in two different ways – once via each programme.
 * e.g. for these connections:
 * Story 1 – Programme A
    Story 1 – Programme B Story 2 – Programme A Story 2 – 
   Programme B
 * get_related() on story 2 returns story 1 twice and on story 1 returns story 2
   twice.
 * Any ideas how I can resolve this?
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

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

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-related-posts-showing-multiple-times/#post-2536887)
 * I don’t know; there might be cases where you don’t want to squash the duplicates.
 *  Thread Starter [tamlyn](https://wordpress.org/support/users/tamlyn/)
 * (@tamlyn)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-related-posts-showing-multiple-times/#post-2536888)
 * OK, I guess I can always put the posts into an array and dedupe them at the end.

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

The topic ‘[Plugin: Posts 2 Posts] Related posts showing multiple times’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-to-posts_7a8e9d.svg)
 * [Posts 2 Posts](https://wordpress.org/plugins/posts-to-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-to-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-to-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-to-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-to-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-to-posts/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [tamlyn](https://wordpress.org/support/users/tamlyn/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-related-posts-showing-multiple-times/#post-2536888)
 * Status: not resolved