Skip to content

How to Exclude Blog Post Based on Post ID in WordPress?

Key Takeaways

  • Nexter Blocks Post Listing excluye entradas por ID en una sola lista, y los posts siguen publicados, accesibles por URL, en búsqueda y en cualquier otra lista.
  • La exclusión usa IDs permanentes y una lista separada por comas; el ID aparece en la URL al editar una entrada como post=123.
  • El bloque ajusta el recuento de la lista: si una lista muestra seis posts y dos quedan excluidos, muestra los dos siguientes para seguir mostrando seis.
Table of Contents

Sometimes a post should stay published and still not appear in a listing. An announcement already featured higher up the page, or a post that belongs elsewhere.

Excluding by post ID removes specific posts from one listing while leaving them live everywhere else.

Before You Start

  • Edition: Free — works in Nexter Blocks (free) and with Nexter Blocks Pro.
  • Block to enable: Post Listing, switched on under Nexter > Blocks in your WordPress dashboard.
  • The post IDs you want to exclude. The ID is in the URL when you edit a post, as post=123.

Steps

  1. Find the ID of each post you want to leave out.
  1. Select your Post Listing block.
The Post Listing block
  1. Enter the IDs in the exclude field, separated by commas.
Entering the post IDs to exclude
  1. Publish and confirm those posts are gone from the listing.

How It Behaves

The excluded IDs are removed from the block’s own query before anything renders.

  • The posts stay published. Excluding affects this listing only, so the posts are still reachable by URL, in search, and in any other listing.
  • It is a comma separated list, so several posts can be excluded at once.
  • Excluding changes the count. A listing set to six posts with two excluded shows the next two instead, so it still shows six.
  • IDs are permanent, unlike slugs, which is why the block uses them.
  • Everything ends up in one attribute. The block writes its whole query configuration into a data-dypost attribute on the published page, so if a setting is not doing what you expect, that is where to look.
  • Measured with Nexter Blocks Pro deactivated: the listing still renders its posts. The block itself is free.

Limitations

  • It is a manual list. Nothing keeps it up to date, so an exclusion set up a year ago quietly keeps hiding a post nobody remembers.
  • IDs are not human readable. Six months later the field says 412, 908 and nobody knows why.
  • It only affects this one listing. Excluding in five places means editing five blocks.
  • Deleting an excluded post leaves a stale ID in the field, which is harmless but confusing.
  • For hiding the newest posts use the offset instead — see hide recent blog posts.

Troubleshooting

The post still shows

Check you used the post ID and not the page ID, and that the list is comma separated with no stray characters.

Where do I find the ID?

Open the post for editing and read it from the address bar, as post=123.

My listing now shows a post I did not expect

Excluding one post lets the next one in, because the listing still fills to its post count. Reduce the count if you do not want that.

I want to hide the newest posts instead

Use the offset rather than exclusions — see hide recent blog posts.

Related Docs

Share your Thoughts

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

What do I need before excluding a blog post by post ID in WordPress?

The key requirement is the post ID, not the slug or title. Nexter Blocks uses the ID because it is permanent, and the page says you can find it in the edit URL as post=123. The Post Listing block also needs to be switched on under Nexter > Blocks in your WordPress dashboard. That matters because the exclusion only works inside that specific listing block.

Why does a post still show after I exclude its ID from the listing?

The most common miss is using a page ID instead of a post ID, or entering the IDs with stray characters instead of a clean comma-separated list. Nexter Blocks removes excluded IDs from the block’s own query before anything renders, so if the post still appears, the field value is usually wrong. The post can still exist elsewhere because exclusion only affects that one listing.

Does excluding a post by ID hide it everywhere on the site?

No. Excluding by ID only changes that one Post Listing block. The post stays published, remains reachable by URL, can still appear in search, and can still show up in other listings. That makes this method useful when a post should stay live but not repeat in one specific list, such as an announcement already featured higher on the page.

What happens to the number of posts shown after I exclude some IDs?

The listing still fills to its configured count. If a block is set to show six posts and two are excluded, Nexter Blocks pulls in the next two posts so the list still shows six. That behavior is useful when you want to keep layout consistency, but it can surprise people who expect the list to shrink instead of backfilling.

Is excluding by post ID better than using offset for hiding recent posts?

For hiding specific posts, exclusion by ID is cleaner because it targets exact items and leaves everything else alone. For hiding the newest posts, offset is the better fit. The page points to hide recent blog posts for that case, which matters because exclusions are manual and stay in place until you change them.

Where do I find the post ID for a WordPress blog post?

Open the post for editing and read the number from the address bar where it appears as post=123. That number is what Nexter Blocks expects in the exclude field. Using the URL value avoids guessing, and it also helps prevent confusion with stale IDs later if a deleted excluded post leaves an old number behind.

Last reviewed: September 27, 2026

Related Docs