Title: [Plugin: Network Latest Posts] New comments assigned to wrong post
Last modified: August 20, 2016

---

# [Plugin: Network Latest Posts] New comments assigned to wrong post

 *  Resolved [snapalot](https://wordpress.org/support/users/snapalot/)
 * (@snapalot)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-network-latest-posts-new-comments-assigned-to-wrong-post/)
 * Hi Jose
 * I’ve tested the ‘random’ parameter and it works great; I use the Prototype theme
   from themehybrid.com to place your widget After Singular (a widget area only 
   displayed on singlepost before the comments).
 * I have one problem now: when new comments are added to a post, the comment gets
   assigned to the wrong post. Could your plugin have something to do with this?
   Maybe not resetting a global variable, WP Query or something?
 * [http://wordpress.org/extend/plugins/network-latest-posts/](http://wordpress.org/extend/plugins/network-latest-posts/)

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

 *  Plugin Author [Jose Luis SAYAGO](https://wordpress.org/support/users/iluminatus/)
 * (@iluminatus)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-network-latest-posts-new-comments-assigned-to-wrong-post/#post-3083704)
 * Hello,
 * Have you tried deactivating Network Latest Posts and tested if the comments are
   registered under the right post?
 * It is pretty strange, because NLPosts doesn’t use any global variable, it switches
   blogs but after pulling posts it switches back to the current one (if this were
   causing problems all posts displayed would be the same), it doesn’t write anything
   to the database all the requests are read-only.
 * Did you asked on Theme Hybrid forums? Maybe there’s a bug related to the theme?
 * Check my first suggestion and please keep me up to date.
 *  Plugin Author [Jose Luis SAYAGO](https://wordpress.org/support/users/iluminatus/)
 * (@iluminatus)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-network-latest-posts-new-comments-assigned-to-wrong-post/#post-3083711)
 * I’ve been testing in my local environment and it works, all comments are being
   published under the right posts with NLPosts active and running. I don’t think
   this issue is related to this plugin but I’m leaving the thread opened to see
   what you find out.
 * Cheers.
 *  Thread Starter [snapalot](https://wordpress.org/support/users/snapalot/)
 * (@snapalot)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-network-latest-posts-new-comments-assigned-to-wrong-post/#post-3083749)
 * Hi Jose
 * Thanks for leaving the thread open.
 * I tried deactivating and reactivating the plugin. I had to modify the `comment_post_id`
   field in the `wp-comments` table in my database to associate the comments with
   the correct posts.
 * When I have the plugin enabled, but remove the widget from single post, new comments
   get published correctly.
 * To be clear: I use NLP’s widget in a widget area after the end of a single post
   and before the comments. I’ll keep testing and ask Justin Tadlock if he has any
   ideas.
 * This plugin does exactly what I want with great flexibility otherwise.
 *  Plugin Author [Jose Luis SAYAGO](https://wordpress.org/support/users/iluminatus/)
 * (@iluminatus)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-network-latest-posts-new-comments-assigned-to-wrong-post/#post-3083771)
 * Hello,
 * Well this was breaking my mental health, it took me a while to figure out what
   was happening. Actually it only happens when you place Network Latest Posts before
   the comments, so I went through the comments functions to see what was happening.
 * I discovered it uses WordPress $wpdb global as my plugin does and I wasn’t reseting
   the posts variables after displaying the results, as a consequence comments took
   some variables pulled from the posts listed through the plugin.
 * I fixed this and pushed the new version 3.1.7 which hopefully closes this issue.
   I’ve tested this and it works, but I will let you test it and close this thread
   if it works.
 * Cheers.
 *  Thread Starter [snapalot](https://wordpress.org/support/users/snapalot/)
 * (@snapalot)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-network-latest-posts-new-comments-assigned-to-wrong-post/#post-3083838)
 * Good morning Jose
 * This is great news! I’ll update and test it today.
 * Thank you
    Kobus
 *  Thread Starter [snapalot](https://wordpress.org/support/users/snapalot/)
 * (@snapalot)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-network-latest-posts-new-comments-assigned-to-wrong-post/#post-3083839)
 * Hi Jose
 * I tested and the problem is fixed. See it in action [here](http://maroelamedia.co.za/blog/nuus/winkelrakke-leeg-weens-staking).
 * Thanks again!
    Kobus
 *  Plugin Author [Jose Luis SAYAGO](https://wordpress.org/support/users/iluminatus/)
 * (@iluminatus)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-network-latest-posts-new-comments-assigned-to-wrong-post/#post-3083847)
 * Great news Kobus!,
 * Nice to see it in action, good work!.
 * Thanks for your feedback. I’m glad it worked.
 * Cheers.

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

The topic ‘[Plugin: Network Latest Posts] New comments assigned to wrong post’ is
closed to new replies.

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

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)
 * [wrong](https://wordpress.org/support/topic-tag/wrong/)

 * 7 replies
 * 2 participants
 * Last reply from: [Jose Luis SAYAGO](https://wordpress.org/support/users/iluminatus/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-network-latest-posts-new-comments-assigned-to-wrong-post/#post-3083847)
 * Status: resolved