Title: Hide Posts &#8211; Related Posts
Last modified: March 18, 2022

---

# Hide Posts – Related Posts

 *  Resolved [harbie](https://wordpress.org/support/users/harbie/)
 * (@harbie)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/hide-posts-related-posts/)
 * is there a way to hide posts from the “related posts” section. I think only that
   is missing.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [MartinCV](https://wordpress.org/support/users/martin7ba/)
 * (@martin7ba)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/hide-posts-related-posts/#post-15473630)
 * Hello [@harbie](https://wordpress.org/support/users/harbie/)
 * Which ‘related posts’ section are you referring to? Is it maybe the ‘Lastest 
   Posts’ block in gutenberg?
 *  Thread Starter [harbie](https://wordpress.org/support/users/harbie/)
 * (@harbie)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/hide-posts-related-posts/#post-15473858)
 * 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);
 *  Plugin Author [MartinCV](https://wordpress.org/support/users/martin7ba/)
 * (@martin7ba)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/hide-posts-related-posts/#post-15973801)
 * Hey [@harbie](https://wordpress.org/support/users/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
 *  Plugin Author [MartinCV](https://wordpress.org/support/users/martin7ba/)
 * (@martin7ba)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/hide-posts-related-posts/#post-15973879)
 * [@harbie](https://wordpress.org/support/users/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

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Hide Posts – Related Posts’ is closed to new replies.

 * ![](https://ps.w.org/whp-hide-posts/assets/icon-256x256.png?rev=2674332)
 * [Hide Posts](https://wordpress.org/plugins/whp-hide-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/whp-hide-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/whp-hide-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/whp-hide-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/whp-hide-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/whp-hide-posts/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [MartinCV](https://wordpress.org/support/users/martin7ba/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/hide-posts-related-posts/#post-15973879)
 * Status: resolved