Hi there,
try this function:
<div class="wpsp-related-posts grid-container">
<h2>Related Posts</h2>
<?php
if ( is_single() ) {
$cats = get_the_category();
$cat = $cats[0];
} else {
$cat = get_category( get_query_var( 'cat' ) );
}
$cat_slug = $cat->slug;
$count = $cat->category_count;
if ( $count == 1 ) {
// Set ID of fallback WPSP list
wpsp_display( 296 );
} else {
$list = get_page_by_title( 'related', 'OBJECT', 'wp_show_posts' );
wpsp_display( $list->ID, 'tax_term="' . $cat_slug . '"' );
}
?>
</div>
You will need to add the WPSP List ID for the fallback list – here: wpsp_display( 296 );