I'm using the Widget Logic plugin to dynamically display a recent posts widget.
This is the code I'm using:
$thiscat = get_category( get_query_var( 'cat' ) ); $postcount = $thiscat->count; return is_single() || is_category() && $postcount > 0;
The problem is, if I'm viewing a single post and that post is the only one in its category, the widget is empty with just the title showing.
I need to change the code so it only displays the widget if there's more than one post in the category.