Title: [Plugin: Yet Another Related Posts Plugin] Comments assigned to wrong posts
Last modified: August 19, 2016

---

# [Plugin: Yet Another Related Posts Plugin] Comments assigned to wrong posts

 *  Resolved [docfloc](https://wordpress.org/support/users/docfloc/)
 * (@docfloc)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-comments-assigned-to-wrong-posts/)
 * Hi,
    looks like comments get assigned to wrong posts (related posts). Not always,
   just sometimes. YARPP is messing something up with the loop.
 * [http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/](http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/)

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

 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-comments-assigned-to-wrong-posts/#post-1190169)
 * [@docfloc](https://wordpress.org/support/users/docfloc/), you marked this as 
   resolved… were you able to figure out your issue? I’d love to know either way.
 *  Thread Starter [docfloc](https://wordpress.org/support/users/docfloc/)
 * (@docfloc)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-comments-assigned-to-wrong-posts/#post-1190170)
 * Hi,
    thanks for asking and thanks for your great plugin. I thought at the beginning
   that the problem is YARPP related, but it looks like it was due to one of my 
   own calls to WP_Query. I added wp_reset_query() and now everything looks ok. 
   Ugly to resolve before i found [http://core.trac.wordpress.org/ticket/4741](http://core.trac.wordpress.org/ticket/4741)
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-comments-assigned-to-wrong-posts/#post-1190181)
 * [@docfloc](https://wordpress.org/support/users/docfloc/) – huh, I actually have
   an even more hacky approach in YARPP itself which you’ll see if you search for`
   $current_query` in [magic.php](https://svn.wp-plugins.org/yet-another-related-posts-plugin/trunk/magic.php).

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

The topic ‘[Plugin: Yet Another Related Posts Plugin] Comments assigned to wrong
posts’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-comments-assigned-to-wrong-posts/#post-1190181)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
