Right, so on the site I have the widget in the sidebar for all pages. And I modify the query using rpwe_default_query_arguments
so that it only shows related blog posts that reference the page’s topic. So if $post->ID == 2
then I add something like $args["category__and"] = array(5, 6);
.
On a few pages this very restrictive filter returns no results at all, displaying the widget title bar and nothing else. So what I did was modify the plugin code so that it runs the query first and then displays the title and results, but only if the query returned more than 0 results.