Title: Conditional Block Visibility
Author: Sanad Qazi
Published: <strong>February 16, 2025</strong>
Last modified: February 28, 2025

---

Search plugins

![](https://ps.w.org/conditional-block-visibility/assets/banner-772x250.png?rev=
3241360)

![](https://ps.w.org/conditional-block-visibility/assets/icon-256x256.png?rev=3241417)

# Conditional Block Visibility

 By [Sanad Qazi](https://profiles.wordpress.org/sanadqazi/)

[Download](https://downloads.wordpress.org/plugin/conditional-block-visibility.1.0.3.zip)

 * [Details](https://test.wordpress.org/plugins/conditional-block-visibility/#description)
 * [Reviews](https://test.wordpress.org/plugins/conditional-block-visibility/#reviews)
 *  [Installation](https://test.wordpress.org/plugins/conditional-block-visibility/#installation)
 * [Development](https://test.wordpress.org/plugins/conditional-block-visibility/#developers)

 [Support](https://wordpress.org/support/plugin/conditional-block-visibility/)

## Description

**Conditional Block Visibility** allows you to manage the visibility of blocks based
on:
 – **User Roles**: Show or hide blocks for specific roles like Administrator,
Editor, Subscriber, etc. – **Login Status**: Display blocks only for logged-in or
logged-out users. – **Device Type**: Control visibility for desktop, tablet, and
mobile devices.

This plugin provides an easy-to-use interface in the block editor for adding visibility
conditions to blocks, without requiring custom code.

### Features

 * **Dynamic User Roles**: Automatically adapts to any custom roles added by other
   plugins.
 * **Flexible Conditions**: Combine multiple conditions for precise control.
 * **Device-Based Control**: Ensure content visibility is optimized for different
   screen sizes.
 * **Visibility Based on Login Status**: Set different content visibility for logged-
   in or logged-out users.
 * Lightweight and easy to use.

### License

This plugin is licensed under the GPLv2 or later. See the [GPLv2 license](https://www.gnu.org/licenses/gpl-2.0.html)
for details.

## Screenshots

 * [[
 * **Visibility Settings in the Editor**
    The plugin adds a “Visibility Settings”
   panel in the block settings sidebar for easy configuration.
 * [[
 * **Dynamic User Roles**
    Select from all available roles, including custom roles.
 * [[
 * **Device-Specific Controls**
    Optimize visibility for desktop, tablet, and mobile
   devices.
 * [[
 * **Set Visibility Based on Login Status**
    Show or hide blocks depending on whether
   the user is logged in or logged out.

## Installation

 1. Upload the plugin files to the `/wp-content/plugins/conditional-block-visibility/`
    directory or install via the WordPress Plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress.
 3. Edit any post or page in the block editor, select a block, and configure visibility
    settings in the “Visibility Settings” panel in the block sidebar.

## FAQ

### Does this plugin work with custom user roles?

Yes, it dynamically detects all user roles, including custom roles added by other
plugins.

### Can I use this plugin on both the frontend and the block editor?

Yes, the visibility conditions work in the editor and the frontend.

### Can I set visibility based on login status?

Yes, you can configure blocks to be visible only to logged-in users, logged-out 
users, or all users.

### Does the plugin require any dependencies?

No, the plugin is standalone and works out of the box with the block editor.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Conditional Block Visibility” is open source software. The following people have
contributed to this plugin.

Contributors

 *   [ Sanad Qazi ](https://profiles.wordpress.org/sanadqazi/)

[Translate “Conditional Block Visibility” into your language.](https://translate.wordpress.org/projects/wp-plugins/conditional-block-visibility)

### Interested in development?

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

## Changelog

#### 1.0.3

 * Fixed custom user role

#### 1.0.2

 * Updated readme

#### 1.0.1

 * Added visibility settings for user roles, login status, and device type.
 * Dynamic detection of user roles.

## Meta

 *  Version **1.0.3**
 *  Last updated **1 year ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 5.8 or higher **
 *  Tested up to **6.7.5**
 *  PHP version ** 7.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/conditional-block-visibility/)
 * Tags
 * [block visibility](https://test.wordpress.org/plugins/tags/block-visibility/)
   [Login Status](https://test.wordpress.org/plugins/tags/login-status/)[user roles](https://test.wordpress.org/plugins/tags/user-roles/)
 *  [Advanced View](https://test.wordpress.org/plugins/conditional-block-visibility/advanced/)

## Ratings

No reviews have been submitted yet.

[Add my review](https://wordpress.org/support/plugin/conditional-block-visibility/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/conditional-block-visibility/reviews/)

## Contributors

 *   [ Sanad Qazi ](https://profiles.wordpress.org/sanadqazi/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/conditional-block-visibility/)

## Donate

Would you like to support the advancement of this plugin?

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