Open tw2113 opened 9 years ago
Similar issues in: Comment editing was being affected.
https://wordpress.org/support/topic/comment-on-specific-post-and-submission-issue?replies=10
Returning on is_admin() solved the issue for this case, but may still have issues on frontend with globals etc.
Adding is_admin to the method regardless, as we shouldn't be doing this in the admin. Still possible the original part of this filed issue is playing parts on frontend.
Perhaps wp_reset_postdata() would solve these issues?
I believe our usage of
in bp-members.php setup_nav method has been causing ID setting that isn't being properly cleaned up, and potentially causes global variable issues for other snippets of code. wp_reset_postdata() didn't help solve it either.
I propose we switch to a standard foreach loop that doesn't use $query->the_post() and just construct our data another way.