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

Key Takeaways

  • Excludes specific posts from listings using the Post Listing block in Nexter Blocks.
  • Utilizes the Exclude Post(s) field to enter post IDs for removal from listings.
  • Supports category-wise filtering in addition to excluding individual posts by ID.
Table of Contents

If you are a blogger or a website owner, you might want to exclude specific posts from your blog listing for various reasons. You may want to keep certain posts private, or you do not want them to appear on particular pages. Excluding posts by post ID in WordPress gives you precise control over which posts appear in your listing, without editing code or modifying post visibility settings.

With the Post Listing block in Nexter Blocks, you can exclude posts by ID directly from the block’s Query settings.

To check the complete feature overview documentation of the Nexter Blocks Post Listing block, click here.

Best Used For:

  • News or magazine sites that need to remove specific posts from a listing page without unpublishing them
  • Business or agency sites that need to hide outdated announcement posts from blog index pages
  • Membership sites that need to exclude gated or private posts from public-facing listing pages

Requirement  – This block is a part of the Nexter Blocks, make sure its installed & activated to enjoy all its powers.

To do this, add the Post Listing block to the page and select the listing type, post type, style, and layout that suit your design.

Then go to the Query tab. In the Exclude Post(s) field, enter the post ID you want to remove from the listing. Use this when a post needs to stay published on your site but must not appear in a specific listing. For example, a featured article already displayed in a hero section on the same page, or a pinned post that is being promoted separately.

Exclude Post(s) field in the Post Listing block Query tab - Nexter Blocks

Note: You can add multiple post IDs separated by commas. 

If you want to filter the listing by category rather than excluding individual posts by ID, the Post Listing block also supports category-wise filtering in WordPress.

To find a post ID, go to Posts in the WordPress Dashboard. Hover over the post you want to identify. The post edit URL appears at the bottom of the browser. The number after post= is the post ID.


Finding post ID in the WordPress Dashboard Posts list - Nexter Blocks

To hide your most recent post from the listing without targeting it by ID, see How to Hide Recent Blog Post from List in WordPress?

Also, check How to Show Related Blog Posts on Blog Single Page in WordPress (Based on Categories & Tags).

About the Author

Photo of Aditya Sharma CMO of Nexter
CMO at POSIMYTH Innovations · Nexter · 7 years experience

He has spent years in the WordPress ecosystem building, breaking, and optimizing sites until they actually perform. He works at the intersection of speed, growth, and usability, helping creators ship websites that load fast and convert. An active WordPress community contributor sharing through tools, tutorials, and direct collaboration. Tested practice, not theory.

WordPressThemesElementorn8nAIClaudeAutomationServer

Share your Thoughts

Get Instant Answers to all your questions about Nexter Blocks,
Extensions & Theme trained on 1000+ Docs and Videos

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!