Hello,
I am using the below code to show related posts under my content.
The problem is I can see the related post on the desktop but when I view it on my smartphone, there is no related post section.
You can check one of my links in the URL section.
What is the solution for this problem and if possible, is there any chance to reduce the grey section around the related post?
Here is the code I am using:
<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’ );
wpsp_display( $list->ID, ‘tax_term=”‘ . $cat_slug . ‘”‘ );
?>