Hi there,
I added the related posts code below to my functions.php and it’s adding related posts on all pages. Can you help me to understand what I would add to make it show up only on the single posts? I’ve been trying to get this to work all day and am running into roadblocks. Also, is there a better way to have it suggest related pages based on the categories the existing page has?
function add_global_blocks_single_post(){
echo do_shortcode(’[recent_posts count=“3” orientation=“horizontal” category=“updates”]’);
}
add_action(‘x_after_the_content_end’, ‘add_global_blocks_single_post’);