Hi there,
i can’t debug the issues from another users site tutorial.
But this is the original code i wrote for displaying a related WP Show Posts list in your Hook Element:
<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;
$list = get_page_by_title( 'related', 'OBJECT', 'wp_show_posts' );
if ( function_exists( 'wpsp_display' ) && is_object( $list ) ) {
wpsp_display( $list->ID, 'tax_term="' . $cat_slug . '"' );
}
?>
</div>
And this blog post from the site it was orginally added to explains how – see Related Posts:
https://gpsites.co/merch/the-single-post/
MAIN THING TO NOTE. You don’t need to add the WPSP ID to the code above. You just need a WPSP List titled: related