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

Key Takeaways

  • Nexter Blocks allows users to exclude posts by ID directly from the Post Listing block's Query settings.
  • The Exclude Post(s) field in the Post Listing block supports multiple post IDs separated by commas.
  • Nexter Blocks is ideal for news sites needing to remove specific posts without unpublishing them.
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 NexterWP
CMO at POSIMYTH Innovations · NexterWP · 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!

Related Frequently Asked Questions

What should I do if the Post Listing block isn't excluding posts as expected?

If the Post Listing block isn't excluding posts, double-check that you've entered the correct post IDs in the Exclude Post(s) field. Ensure that the IDs are separated by commas if excluding multiple posts. Also, verify that the block is properly installed and activated as part of the Nexter Blocks. If issues persist, consider clearing your site cache to ensure changes are reflected.

Can I use the Post Listing block to exclude posts from specific categories?

The Post Listing block specifically excludes posts based on their IDs, not categories. If you want to manage visibility based on categories, you might need to explore other options or custom queries. For related functionality, check out how to show related blog posts on a single page.

What are the best practices for excluding posts using the Post Listing block?

When excluding posts, ensure you only include the post IDs you want to hide. It's best to keep the list concise to avoid confusion. Remember that you can add multiple IDs separated by commas. This helps maintain a clean blog post listing and improves user experience by showing only relevant content.

How do I find the post ID for exclusion in the Post Listing block?

To find a post ID, navigate to your WordPress Dashboard, go to Posts, and hover over the desired post. The post edit URL will appear at the bottom of your browser, showing the ID after 'post='. This ID is what you'll need to enter in the Exclude Post(s) field of the Post Listing block.

What happens if I enter an invalid post ID in the Exclude Post(s) field?

If you enter an invalid post ID in the Exclude Post(s) field, that post will not be excluded from the listing. The block will simply ignore the invalid ID, and all valid posts will still be displayed. Always verify the IDs before saving your settings to ensure the correct posts are excluded.

Last reviewed: April 17, 2026

Related Docs