---
title: "How to Exclude Blog Post Based on Post ID in WordPress?"
url: https://nexterwp.com/docs/exclude-blog-post-based-on-post-id-in-wordpress/
date: 2023-05-06
modified: 2026-04-17
author: "Aditya Sharma"
description: "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..."
image: https://nexterwp.com/wp-content/uploads/2024/05/exclude-blog-post-based-on-post-id-in-wordpress-1024x519.jpg
word_count: 388
---

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

## Key Takeaways

- Nexter Blocks Post Listing block excludes posts by ID directly from the Query settings, giving precise control over which posts appear in a listing without editing code or changing post visibility settings.
- Exclude Post(s) field accepts multiple post IDs separated by commas, and the post stays published on the site while it does not appear in a specific listing.
- WordPress Dashboard shows the post ID in the post edit URL after post= when hovering over a post in Posts, and the Post Listing block also supports category-wise filtering.

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](https://nexterwp.com/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](/docs/post-listing-block-settings-overview/).

**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.***

[LIVE BLOCK LINK](https://nexterwp.com/nexter-blocks/listing/wordpress-post-listing/)

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](https://nexterwp.com/wp-content/uploads/2023/05/post-listing-layout-query-exclude-posts-new.png)

> *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](https://nexterwp.com/docs/add-category-wise-filter-in-blog-post-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](https://nexterwp.com/wp-content/uploads/2023/05/post-listing-layout-query-dashboard-posts.png)

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?](https://nexterwp.com/docs/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)](https://nexterwp.com/docs/show-related-blog-posts-on-blog-single-page-in-wordpress/).