CrispyCohd Gated Content Block (Lite)
CrispyCohd Gated Content Block (Lite) provides a simple, secure way to restrict access to content in the WordPress block editor based on whether a visitor is logged in or logged out.
Unlike plugins that rely on JavaScript or CSS to hide content after it has loaded, this plugin applies true server-side content gating, ensuring restricted content is never rendered or exposed to the browser when access conditions are not met.
The gate block acts as a structural marker in your content flow: – If the visitor meets the access condition, the gate is hidden and content continues rendering normally. – If the visitor does not meet the condition, the gate message is displayed and all content after it is hidden.
This approach is secure, predictable, and fully compatible with caching and SEO.
Flexible, Block-Based Gated Layouts
CrispyCohd Gated Content Block works seamlessly with any core or custom WordPress block, giving you full freedom to design gated sections that suit your content and audience. Because the gate acts as a structural control point rather than a rigid wrapper, you can combine familiar blocks such as Columns, Groups, Buttons, or even the WordPress Login block to build clear, styled calls-to-action for restricted content. This makes it easy to create polished, conversion-focused gated layouts — such as a custom login prompt — using the block editor alone, without shortcodes, custom templates, or additional plugins.
Upgrade to Pro
The Lite version is ideal for simple login-based restrictions.
The Pro version adds advanced gating options including: – User roles (including custom roles) – WooCommerce product ownership – WooCommerce subscriptions – User meta conditions – Advanced visual controls and fade effects
Existing Lite content remains fully compatible when upgrading.
Upgrade here: https://crispycohd.com/products/crispycohd-gated-content-block
Build & Development
This plugin is built using the standard WordPress block development tooling.
All source files required to build the plugin are included in the plugin package.
Requirements
- Node.js (LTS recommended)
- npm (comes with Node.js)
Build Process
-
Navigate to the plugin directory: wp-content/plugins/crispycohd-gated-content-block/
-
Install dependencies: npm install
-
Build the plugin assets: npm run build
This will compile the block editor JavaScript and CSS into the build/ directory.
Development Mode
For active development, you may run: npm run start
This will watch source files and rebuild assets automatically on change.
Source Files
The editable source files are located in:
– blocks/gated-content/src/ (block editor JavaScript)
– assets/ (editor and front-end styles)
– includes/ (PHP logic and server-side rendering)
The compiled files in the build/ directory are generated from these sources and are included for distribution.
No external services, license checks, or remote build steps are required.
