Title: Query Loop Exclude Current Post
Author: Lauren @ Small Plugins
Published: <strong>November 18, 2026</strong>
Last modified: November 18, 2026

---

Search plugins

![](https://ps.w.org/query-loop-exclude-current-post/assets/banner-772x250.png?rev
=3809731)

![](https://ps.w.org/query-loop-exclude-current-post/assets/icon.svg?rev=3809716)

# Query Loop Exclude Current Post

 By [Lauren @ Small Plugins](https://profiles.wordpress.org/smallplugins/)

[Download](https://downloads.wordpress.org/plugin/query-loop-exclude-current-post.0.0.8.zip)

 * [Details](https://wordpress.org/plugins/query-loop-exclude-current-post/#description)
 * [Reviews](https://wordpress.org/plugins/query-loop-exclude-current-post/#reviews)
 *  [Installation](https://wordpress.org/plugins/query-loop-exclude-current-post/#installation)
 * [Development](https://wordpress.org/plugins/query-loop-exclude-current-post/#developers)

 [Support](https://wordpress.org/support/plugin/query-loop-exclude-current-post/)

## Description

A “You might also like” section at the bottom of a post usually pulls from the same
category as the post itself, which means the post someone is already reading often
shows up in its own related list.

This plugin adds a single toggle to the Query Loop block called **Exclude Current
Post**. Switch it on and that loop leaves out whichever post is being viewed, so
the list always shows something else.

**How it works**

 * Select a Query Loop block, open the block settings sidebar, and turn on **Exclude
   Current Post**.
 * The setting belongs to that one block, so you can have several Query Loops on
   the same page with the toggle on for some and off for others.
 * The post is removed before the posts-per-page limit is applied, so a loop set
   to show three posts still shows three, not two.
 * It works on the front end and in the editor preview, so what you see while building
   the page matches what visitors get.

**No settings page**

There is nothing to configure. The plugin adds the one toggle to the Query Loop 
block and does nothing else.

**Works alongside post selection plugins**

If another plugin has already narrowed a loop down to a hand-picked set of posts,
the current post is removed from that set rather than being ignored.

### External services

This plugin bundles the Small Plugins SDK, which adds a **Small Plugins** screen
to your WordPress admin listing our other plugins.

When an administrator opens that screen, the SDK requests the plugin list from smallplugins.
com:

 * **Endpoint:** https://smallplugins.com/wp-json/small-plugins/v1/plugins
 * **When:** only while the Small Plugins admin screen is being viewed. The response
   is cached, so the request is not repeated on every page load.
 * **What is sent:** no personal data and no site content. The request carries the
   SDK version and your site’s home URL in the User-Agent header.
 * **What is received:** the list of Small Plugins products shown on that screen.

No request is made from the front end of your site, and excluding the current post
from a Query Loop works whether or not this request succeeds.

This service is provided by Small Plugins. Terms and conditions: https://www.smallplugins.
com/legal/terms-and-conditions/ Privacy policy: https://www.smallplugins.com/legal/
privacy-policy/

## Screenshots

[⌊A related posts Query Loop on an article about Easy Pasta Bake. Left as it is,
the loop lists the post the reader is already on. With Exclude Current Post switched
on, only the other recipes remain.⌉⌊A related posts Query Loop on an article about
Easy Pasta Bake. Left as it is, the loop lists the post the reader is already on.
With Exclude Current Post switched on, only the other recipes remain.⌉[

A related posts Query Loop on an article about Easy Pasta Bake. Left as it is, the
loop lists the post the reader is already on. With Exclude Current Post switched
on, only the other recipes remain.

## Installation

 1. In your WordPress admin, go to **Plugins > Add New** and search for “Query Loop
    Exclude Current Post”.
 2. Click **Install Now**, then **Activate**.
 3. Edit any post, page or template containing a Query Loop block, select the block,
    and turn on **Exclude Current Post** in the block settings sidebar.

To install manually, upload the plugin folder to `/wp-content/plugins/` and activate
it from the Plugins screen.

## FAQ

### Where is the setting?

Select a Query Loop block in the editor and open the settings sidebar on the right.
There is a panel called **Exclude Current Post** with a single toggle inside it.

### I do not see the toggle on my Query Loop block

The toggle only appears when the Query Loop uses its own query. If **Inherit query
from template** is switched on, the block is showing the page’s main query, such
as an archive or search results, where there is no single post being viewed to exclude.
Switch inheriting off and the toggle appears.

### Does it affect the other Query Loops on the page?

No. The setting is stored on each block separately, so turning it on for one loop
leaves every other loop on the page exactly as it was.

### Will my related posts section end up one short?

No. The current post is excluded before the posts-per-page limit is applied, so 
a loop set to show three posts shows three other posts.

### Does it work with custom post types?

Yes. The plugin does not care which post type a loop is querying.

### Does it work with the Classic Editor or with shortcodes?

No. This plugin extends the Query Loop block, so it needs the block editor.

### Does it slow my site down?

No. It adds the current post’s ID to the query’s exclusion list, which is a normal
part of how WordPress builds a query.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Query Loop Exclude Current Post” is open source software. The following people 
have contributed to this plugin.

Contributors

 *   [ Lauren @ Small Plugins ](https://profiles.wordpress.org/smallplugins/)
 *   [ Lauren @ Once Coupled ](https://profiles.wordpress.org/oncecoupled/)
 *   [ Zafar Kamal ](https://profiles.wordpress.org/zafark/)

[Translate “Query Loop Exclude Current Post” into your language.](https://translate.wordpress.org/projects/wp-plugins/query-loop-exclude-current-post)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/query-loop-exclude-current-post/),
check out the [SVN repository](https://plugins.svn.wordpress.org/query-loop-exclude-current-post/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/query-loop-exclude-current-post/)
by [RSS](https://plugins.trac.wordpress.org/log/query-loop-exclude-current-post/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.0.8

 * Replaced the Freemius framework with the Small Plugins SDK.
 * Tested with WordPress 7.1.

#### 0.0.7

 * Updated the bundled framework and WordPress compatibility.

#### 0.0.6

 * Fixed the exclusion being ignored when another plugin had already limited a loop
   to a hand-picked set of posts.

#### 0.0.5

 * Maintenance update.

## Meta

 *  Version **0.0.8**
 *  Last updated **3 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 5.8.3 or higher **
 *  Tested up to **7.1.5**
 *  PHP version ** 5.6 or higher **
 * Tags
 * [current post](https://wordpress.org/plugins/tags/current-post/)[exclude](https://wordpress.org/plugins/tags/exclude/)
   [query block](https://wordpress.org/plugins/tags/query-block/)[query loop](https://wordpress.org/plugins/tags/query-loop/)
   [related posts](https://wordpress.org/plugins/tags/related-posts/)
 *  [Advanced View](https://wordpress.org/plugins/query-loop-exclude-current-post/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/query-loop-exclude-current-post/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/query-loop-exclude-current-post/reviews/)

## Contributors

 *   [ Lauren @ Small Plugins ](https://profiles.wordpress.org/smallplugins/)
 *   [ Lauren @ Once Coupled ](https://profiles.wordpress.org/oncecoupled/)
 *   [ Zafar Kamal ](https://profiles.wordpress.org/zafark/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/query-loop-exclude-current-post/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://smallplugins.com/)