I’ve run into this problem before. It was due to a collision between variables with a custom WP_Query
in a template.
I’d check the template in question for using $posts
$comment_post_ID
or $post_ID
. If any of those exist, I’d change the scope of the variables to the theme in question. For example change $posts
to something like $theme_name_posts
.
If this is a third-party theme that is getting updates, I’d advise setting up a child theme to solve this problem so you can continue to get theme updates without re-introducing this problem