Hello @harbie
Which ‘related posts’ section are you referring to? Is it maybe the ‘Lastest Posts’ block in gutenberg?
Thread Starter
harbie
(@harbie)
Its the section below the blog that shows
“Related Posts”
and shows posts related to that category. Even though I turn off category and archive, still pops up in there.
Code kind of looks like this:
$related = get_posts( array( ‘category__in’ => wp_get_post_categories($post->ID), ‘numberposts’ => 4, ‘post__not_in’ => array($post->ID) ) );
if( $related ) foreach( $related as $post )
{
setup_postdata($post);
Hey @harbie, this is showed on a single post page.
The plugin currently doesn’t have an option to run the logic on Single post pages, but I will try to add in the next version.
Best,
Martin
@harbie I added new update that has option to hide posts on single post page. Please check it and let me know if it will work