Title: BlockSieve
Author: Jahirul Islam
Published: <strong>October 25, 2026</strong>
Last modified: October 25, 2026

---

Search plugins

![](https://ps.w.org/blocksieve/assets/banner-772x250.png?rev=3764791)

![](https://ps.w.org/blocksieve/assets/icon-256x256.gif?rev=3764791)

# BlockSieve

 By [Jahirul Islam](https://profiles.wordpress.org/jahirulwp/)

[Download](https://downloads.wordpress.org/plugin/blocksieve.1.0.0.zip)

 * [Details](https://wordpress.org/plugins/blocksieve/#description)
 * [Reviews](https://wordpress.org/plugins/blocksieve/#reviews)
 *  [Installation](https://wordpress.org/plugins/blocksieve/#installation)
 * [Development](https://wordpress.org/plugins/blocksieve/#developers)

 [Support](https://wordpress.org/support/plugin/blocksieve/)

## Description

Sometimes a block should only be there for some people, or only some of the time.
A welcome message for members. A sign-up prompt for everyone else. A promo that 
runs for two weeks and then quietly goes away. A big hero image that looks great
on desktop but gets in the way on a phone.

BlockSieve gives every block in the editor a small **Visibility** panel where you
describe when the block should appear. That is the whole plugin. There is no separate
settings screen to learn and no shortcodes to remember. Open the block, set a rule
or two, and you are done.

#### What you can base a rule on

 * Whether the visitor is logged in or logged out.
 * The visitor’s user role, picked from the roles on your site.
 * A date range, certain weekdays, or a time of day, all in your site’s time zone.
 * The device: desktop, tablet or mobile.
 * The post type, or specific pages and posts chosen from a search box.
 * The kind of page being viewed: the front page, the blog index, a category or 
   tag archive, search results, the 404 page, and so on.
 * Something in the URL, or a query parameter such as a campaign tag.

Add as many rules as you like to one block and decide whether all of them have to
match or any one of them is enough.

#### It works on the server

BlockSieve checks your rules on the server while the page is being built. If a block
should not be shown, its HTML is simply left out of the page. The one exception 
is the device rule: it uses CSS so that it follows the screen width, which means
the block stays in the page and is hidden on the devices you deselected.

Because the rules run on the server, there is no JavaScript on the front end. The
only extra file your visitors might load is a tiny stylesheet, and only on pages
that use the device rule.

#### It fails on the safe side

If a rule is ever broken, say because a plugin that provided a custom rule was removed,
BlockSieve shows the block rather than hiding it. You will not find a page missing
half its content because of a stale setting. The report described below will tell
you about it instead.

#### Keep track of what you have hidden

After a while it is easy to forget which blocks have rules on them. **Tools  BlockSieve**
lists every block on the site that has a visibility rule, including blocks tucked
away in site editor templates, synced patterns and block widgets. For each one you
can see the rules in plain words and a preview of whether a visitor or an administrator
would see it right now.

The report also points out things that probably are not what you meant:

 * a rule type left behind by a plugin you no longer have,
 * a role or page list that is empty and can never match,
 * a date range that has already ended,
 * two rules that contradict each other.

You can filter and search the list, and glance at the totals from a widget on the
Dashboard.

#### For developers

The rule engine is plain PHP with no WordPress calls inside it, so it is easy to
test and easy to extend. You can register your own rule types with one action, override
any decision with a filter, and tune the report’s cache lifetime, scan limit and
post types with filters. The `docs/` folder inside the plugin has the details.

#### Privacy

BlockSieve runs entirely on your own server. It does not call out to any service,
load anything from a CDN, collect usage data or set cookies. It stores one option
for its settings and one short-lived transient for the cached report, and removes
both when you delete the plugin. Your visibility rules are saved inside the block
content itself.

## Screenshots

[⌊The Visibility panel in the block inspector, with a block limited to logged-in
users.⌉⌊The Visibility panel in the block inspector, with a block limited to logged-
in users.⌉[

The Visibility panel in the block inspector, with a block limited to logged-in users.

[⌊Several rules on one block, matched with "All conditions" or "Any condition".⌉⌊
Several rules on one block, matched with "All conditions" or "Any condition".⌉[

Several rules on one block, matched with “All conditions” or “Any condition”.

[⌊The report under Tools → BlockSieve, with a preview of how every block resolves.⌉⌊
The report under Tools → BlockSieve, with a preview of how every block resolves.⌉[

The report under Tools  BlockSieve, with a preview of how every block resolves.

[⌊The Dashboard summary widget.⌉⌊The Dashboard summary widget.⌉[

The Dashboard summary widget.

## Installation

 1. Upload the `blocksieve` folder to `/wp-content/plugins/`, or install it from **
    Plugins  Add New**.
 2. Activate **BlockSieve**.
 3. Select any block in the editor and open the **Visibility** panel in the sidebar.
 4. Turn on **Enable visibility conditions** and add the rules you need.
 5. When you want an overview, visit **Tools  BlockSieve**.

## FAQ

### Where are the rules checked?

On the server, each time the page is rendered. A hidden block’s HTML is never sent
to the browser. The device rule is the exception: it is applied with CSS, so the
block stays in the page.

### Is this a security feature?

It is a content feature. Markup hidden by any rule other than the device rule really
is removed from the page, so it cannot be revealed with developer tools. But it 
is meant for tailoring what people see, such as showing a block to members only.
For genuinely sensitive data you should still rely on proper capability checks.

### Does it work with every block?

Yes. Core blocks, blocks from other plugins, dynamic blocks and static blocks all
get the same panel, as long as they render through the normal block pipeline, which
almost all do.

### How does the device rule work?

It uses CSS media queries for desktop, tablet and mobile widths rather than guessing
from the browser’s user agent. The block stays in the page and is hidden at the 
widths you deselected, so it behaves correctly when a window is resized.

### Will I still see hidden blocks while editing?

Yes. Rules are only applied on the front end. In the editor every block is visible
so you can always find it and change it.

### What happens if I deactivate the plugin?

Nothing is lost. The rules are stored as a block attribute inside your content. 
While the plugin is off, every block simply shows. Turn it back on and the rules
apply again.

### How do I find every block I have hidden?

Go to **Tools  BlockSieve**. It lists every block with a rule, across posts, templates,
synced patterns and widgets, and flags anything that will not behave the way you
probably intended.

### Does it work with page caching?

Rules are checked when a page is built, so a page cache serves whatever version 
it stored first. Rules that depend on the visitor, such as logged in or out, user
role, URL or query parameter, and time-based rules need the page to be built fresh.
Make sure your cache is bypassed for logged-in users, and exclude pages that use
the other rules from the cache. The device rule works with any cache because it 
uses CSS.

### Does the report slow my site down?

No. It only runs in the admin area, its result is cached, and the cache is refreshed
when content changes. Nothing about it runs on the front end.

### Can I add my own rule types?

Yes. Implement `ConditionInterface` (or extend `AbstractCondition`) and register
your class on the `blocksieve_register_conditions` action. The editor picks it up
automatically. See `docs/developers.md` inside the plugin.

### Does the plugin connect to any external service?

No. See the Privacy section above.

### Is the editor source code available?

Yes. The editor bundle in `build/` is compiled with the official `@wordpress/scripts`
toolchain, and the readable source ships with the plugin in the `src/` folder. Run`
npm install && npm run build` to rebuild it.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“BlockSieve” is open source software. The following people have contributed to this
plugin.

Contributors

 *   [ Jahirul Islam ](https://profiles.wordpress.org/jahirulwp/)

[Translate “BlockSieve” into your language.](https://translate.wordpress.org/projects/wp-plugins/blocksieve)

### Interested in development?

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

## Changelog

#### 1.0.0

 * Initial release.
 * Visibility panel for every block, with all/any matching and fail-safe evaluation.
 * Twelve built-in rules: Logged In, Logged Out, User Role, Date Range, Weekdays,
   Time Range, Device, Post Type, Page / Post, Page View, URL Contains and Query
   Parameter.
 * Server-side enforcement in the `render_block` filter.
 * Responsive, CSS-based device targeting with a stylesheet that loads only when
   needed.
 * Report under Tools  BlockSieve with warnings, previews, filters and search, plus
   a Dashboard summary widget.
 * Action and filter hooks for custom rule types and result overrides.

## Meta

 *  Version **1.0.0**
 *  Last updated **4 days ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.7 or higher **
 *  Tested up to **7.1.4**
 *  PHP version ** 8.1 or higher **
 * Tags
 * [conditional blocks](https://wordpress.org/plugins/tags/conditional-blocks/)[conditional content](https://wordpress.org/plugins/tags/conditional-content/)
   [gutenberg](https://wordpress.org/plugins/tags/gutenberg/)[visibility](https://wordpress.org/plugins/tags/visibility/)
 *  [Advanced View](https://wordpress.org/plugins/blocksieve/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/blocksieve/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/blocksieve/reviews/)

## Contributors

 *   [ Jahirul Islam ](https://profiles.wordpress.org/jahirulwp/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/blocksieve/)