Title: Exclude Category or Dont Repeat Post
Last modified: July 17, 2020

---

# Exclude Category or Dont Repeat Post

 *  Resolved [alantygel](https://wordpress.org/support/users/alantygel/)
 * (@alantygel)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/exclude-category-or-dont-repeat-post/)
 * Hi,
 * First of all, thanks for the great software.
 * I’m building a home page where I should have two `custom post type` blocks:
 * 1) First one showing a selected featured post, and
    2) a second one showing the
   4 more recent posts except the featured one.
 * I created a custom taxonomy (`featured`), and wanted to include in the first 
   block posts marked as `featured:yes`, and in the second block posts **NOT** marked
   as `featured:yes`.
 * Is it possible to do this, i.e., set an exclude category? (Without making user
   have to set `featured:no`). Another option would be a filter to avoid repeating
   posts through several blocks in the same page.
 * As a side note, I tried to use sticky posts. However, if my first block is set
   to show one post, and the second more recent post is marked as sticky, it shows
   two posts. Is this a bug?
 * Best,
    alan
    -  This topic was modified 5 years, 10 months ago by [alantygel](https://wordpress.org/support/users/alantygel/).

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

 *  [raven747](https://wordpress.org/support/users/raven747/)
 * (@raven747)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/exclude-category-or-dont-repeat-post/#post-13136946)
 * Why not use “Avoid Duplicate Posts” plugin and it will prevent anything that 
   was shown to be shown twice. It just taps into the wp-posts query so super light
   weight.
 * As the forums say, you will need the code to ensure it works in wordpress 5.4
   but just alter:
 * if (!is_home())
    to if (!is_front_page())
 *  Thread Starter [alantygel](https://wordpress.org/support/users/alantygel/)
 * (@alantygel)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/exclude-category-or-dont-repeat-post/#post-13137047)
 * Hi,
 * Thanks for the answer! I particularly wouldn’t install a plugin with more than
   one year without updates and 100 installs in a production website, but I included
   the code into my theme and it works quite well.
 * Although it solves my specific point, I would still be very happy to see the 
   possibility of a filter that excludes a term.
 * Thanks,
    alan
 *  Plugin Support [dimned](https://wordpress.org/support/users/dimned/)
 * (@dimned)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/exclude-category-or-dont-repeat-post/#post-13143830)
 * Hi [@alantygel](https://wordpress.org/support/users/alantygel/),
    Thank for your
   feedback however it is possible select the proper terms to show in this or that
   Custom Post Type block. We will keep your request in mind.

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

The topic ‘Exclude Category or Dont Repeat Post’ is closed to new replies.

 * ![](https://ps.w.org/getwid/assets/icon.svg?rev=2238400)
 * [Getwid - Gutenberg Blocks](https://wordpress.org/plugins/getwid/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/getwid/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/getwid/)
 * [Active Topics](https://wordpress.org/support/plugin/getwid/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/getwid/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/getwid/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [dimned](https://wordpress.org/support/users/dimned/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/exclude-category-or-dont-repeat-post/#post-13143830)
 * Status: resolved