Show or hide any Gutenberg block based on conditions - just like Wicked Block Conditions!
Plugin Name: Conditional Headers (Blocks)
Version: 1.0.0
Author: Darin Higgs
Agency: Higggs Agency
License: GPL v2 or later
Conditional Headers (Blocks) extends ALL Gutenberg blocks with conditional display features. It works exactly like the popular Wicked Block Conditions plugin, adding a "Display Conditions" panel to every block in the WordPress editor.
Perfect for creating conditional headers, member-only content, page-specific styling, and much more!
✅ Extends ALL blocks - Works with any Gutenberg block (core, theme, or third-party)
✅ Familiar interface - Identical experience to Wicked Block Conditions
✅ Visual condition editor - Easy-to-use interface in the block inspector
✅ Multiple condition types - User login status, post targeting, and more
✅ Show/Hide logic - Flexible display control
✅ No coding required - Visual configuration only
- Edit any post/page in the Gutenberg editor
- Select any block (heading, HTML, paragraph, etc.)
- Open the "Display Conditions" panel in the right sidebar
- Configure your conditions with the visual interface
- Choose show or hide when conditions are met
- Publish - blocks appear/disappear based on your rules!
- User Is Logged In - Show content only to logged-in users
- User Is Not Logged In - Show content only to visitors
- Check Post ID - Target specific posts by ID number
- Check Post Slug - Target posts/pages by their URL slug
Hide/show headers on specific pages:
Block: HTML (with header code)
Condition: "Hide this block" → "Check Post Slug" → "contact"
Result: Header hidden only on the contact page
Show content only to logged-in users:
Block: Any content block
Condition: "Show this block" → "User Is Logged In"
Result: Content visible only when user is logged in
Add CSS only to specific posts:
Block: HTML (with CSS code)
Condition: "Show this block" → "Check Post ID" → "123"
Result: CSS loads only on post ID 123
- Upload the plugin zip file through Plugins → Add New → Upload Plugin
- Activate the plugin
- Edit any post/page and look for "Display Conditions" in the block inspector
- Create/edit a post or page
- Add any block (HTML, Heading, Paragraph, etc.)
- Select the block to see its settings
- Find "Display Conditions" panel in the right sidebar
- Choose action: "Show this block" or "Hide this block"
- Click "Add Condition" to set rules
- Configure condition using the form fields
- Save/Update your post
- Select your block
- Display Conditions → "Hide this block"
- Add Condition → "Check Post Slug"
- Enter: "contact"
- Save
The block will now be hidden when viewing the page with slug "contact".
- WordPress: 5.0+ required
- PHP: 7.4+ required
- Architecture: Simple, bulletproof PHP - no complex dependencies
- Performance: Minimal overhead, only evaluates conditions on frontend
- Compatibility: Works with all themes and third-party blocks
For questions and support, please contact Higggs Agency.
- WordPress: 5.0+
- PHP: 7.4+
- Node.js: 16+ (for development only)
- Git: For version control
- Clone this repository:
git clone <repository-url>
- Install in your WordPress
wp-content/plugins/
directory - Activate the plugin in WordPress admin
- Make changes and test locally before pushing
conditional-headers-blocks/
├── conditional-headers-blocks.php # Main plugin file
├── classes/ # PHP classes
│ └── class-conditional-headers-blocks.php
├── build/ # Compiled JS/CSS assets
├── dist/ # Distribution files
├── assets/ # Source assets
├── README.md # Documentation
└── .gitignore # Git ignore rules
This plugin uses Semantic Versioning:
- MAJOR.MINOR.PATCH (e.g., 1.2.3)
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
- ✅ Complete block extension system
- ✅ Display Conditions panel for all blocks
- ✅ User login/logout conditions
- ✅ Post ID and slug targeting
- ✅ Professional, stable codebase
- ✅ Version control setup with Git
- ✅ Automated build and packaging system
Developed by Darin Higgs at Higggs Agency
Professional WordPress development and custom solutions