No results found. Try again with different words?
Search must be at least 3 characters.
- Section
- Troubleshooting – Icons missing from the blocks
- Spectra Patterns
- How to Set Multiple Column Fields in Contact Form 7 Styler of Spectra?
- Styling Checkbox / Radio / Acceptance control in Contact Form 7 Designer block of Spectra
- Unable to Style Checkbox / Radio Buttons / Acceptance Control using Contact Form 7 Styler of Spectra
- Tab Index – for multiple Gravity Forms
- How to Get Started with Spectra
- How to Exclude A Heading from Table of Contents?
- Spectra – Display Conditions for Blocks
- Importing Single Pages, Templates, and Block Patterns In Spectra
- How to Enable or Disable the Design Library Button
- Spectra – Copy and Paste Style
- Spectra – Container Flex property
- Spectra – Default Content Width
- Spectra – Blocks Editor Spacing
- Spectra – Collapse Panels
- Spectra – Responsive Conditions
- Spectra Pro Dynamic Content Extension
- Site Visibility
- Clearing Cache with Spectra Actions
- Quick Action Bar
- Add Multiple Instagram Accounts in Spectra
- Getting Started with Grid Builder
- Move the Title Bar to Top
- Resolving Layout Conflicts with Spectra Containers After Astra Update
- How to Register High-Privileged Users on Your Website
- Additional User Roles to Access AI Assistant
- Spectra Database Update Instructions (Version 2.0.0 and Below)
- Installing and Importing Starter Templates
- How to Get Started with Spectra
- Manually Install Spectra via FTP
- Automatic Beta Updates for Spectra
- How to Rollback to Previous Spectra Versions
- How to Load Google Fonts Locally
- Activate the Spectra Pro License Key
- How to Install Spectra Pro Plugin
- Translate Spectra Strings using Loco Translate
- How to add a Transparent / Sticky header?
- How to Change the Site Logo?
- How to Change Global Styles?
- How to Disable Title on Posts, Pages?
- How to add a transparent/ sticky header for a single page/post?
- Change Header and Footer Patterns in Spectra One Theme
- Add Custom/Google Fonts In Spectra One
- How to reset global default styling?
- Manually Install Spectra One via FTP?
- Disable or Enable Header/Footer for Specific Pages/Posts
Spectra – Display Conditions for Blocks
Spectra has introduced the Display conditions feature for the blocks. The Display conditions are the options on which you would like to hide the block based on User State, User Role, Browser, and Operating System.
You can enable the Display conditions from the Spectra Admin Panel. Navigate to Spectra > Dashboard > Blocks / Extensions > Display Conditions. Setting the toggle to on mode will enable the Display Conditions for blocks.
Once you enable the display conditions option, you can find the Display Conditions settings under the ‘Others’ section of the respective blocks.
Let’s see the options or conditions on which you can hide the block –
- User State–Hide from Logged In, Logged out users.
- Hide for User Role– None, Administrator, Editor, Author, Contributor, Subscriber, Customer, Shop Manager, Group Leader, LMS Manager, Instructor, Instructor’s Assistant, Student.
- Hide on Browser–Internet Explorer, Mozilla Firefox, Google Chrome, Opera Mini, Opera, Safari, Microsoft Edge.
- Hide on Operating System–iOS, Android, Windows, OpenBSD, SunOS, Linux, Mac OS.
- Day-You can select the days you want to disable. (Note: This setting will only take effect once you are on the live page, not while editing.)
How to disable Block Display Conditions for specific post types?
To disable Block Display Conditions for specific post types, you need to add the below mentioned filters to the functions.php file.
To access the functions.php file, navigate to Appearance → Theme Editor from your WordPress dashboard. Then, open the functions.php file from the list on the right.
1) To disable the Block display conditions from all post types.
add_filter( \'enable_block_condition\', \'__return_false\' );
2) To disable the Block display conditions for Page post type.
add_filter( \'enable_block_condition\', function( $default = true) {
if (isset($_REQUEST[\'post_type\']) && \'page\' === $_REQUEST[\'post_type\']) {
return false;
} elseif (isset($_GET[\'post\']) && \'page\' === get_post_type($_GET[\'post\'])) {
return false;
}
return $default;
} );
3) To disable the Block display conditions for Post.
add_filter( \'enable_block_condition\', function( $default = true) {
global $pagenow;
if(in_array( $pagenow, array( \'post.php\', \'post-new.php\' ) )){
if (isset($_REQUEST[\'post_type\']) && \'page\' === $_REQUEST[\'post_type\']) {
return true;
} elseif (isset($_GET[\'post\']) && \'page\' === get_post_type($_GET[\'post\'])) {
return true;
}
return false;
}
return $default;
} );
Frequently Asked Questions
We don't respond to the article feedback, we use it to improve our support content.