Content Area Block
Adds a block content area to a site editor template and stores the blocks in a specified meta field. By default, the plugin will add a new meta field …
Plugin info
Maintenance & Compatibility
Maintenance score
Actively maintained • Last updated 30 days ago
Is Content Area Block abandoned?
Likely maintained (last update 30 days ago).
Compatibility
Similar & Alternatives
Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.
Description
This block allows you to add an additional block content area to a site-editor template and store the block output inside a meta field. By default, WordPress posts or pages may only store blocks in one place: post_content. These blocks are output on the page using the core/post-content block. This block allows you to have multiple “outlets” where you can add blocks so you can have post-specific blocks appear in more than one location in the template.
The block is a fork of the core/post-content block that uses a customized version of the useEntityBlockEditor hook which supports meta keys. The blocks for your content area are then stored inside that meta key (instead of post_content). This allows you to keep the blocks separate and you can use as many of these on a single template as you want (but in most cases 2 is probably enough). It’s all up to you!
Requirements
- Using this plugin requires you to enable template previews (which will let you visually see the new content area you’re adding). This can be enabled on any given post or page, but you can optionally set it on by default using a filter.
- Your theme must be a block theme (i.e. it uses the site editor). This won’t work for a hybrid or classic theme (which has no concept of live template preview in the block editor).
Hooks
If you want to disable this meta key’s registration, add the following to your theme or plugin:
For advanced users, there is also a filter for the entire block’s output. See the below snippet from render.php:
', ']]>', $content ) ),
$block_post_id,
$attributes,
$content,
$block
);
Contributing
The plugin source code may be found here: https://github.com/iansvo/content-area-block.
To build the plugin from source, you must have NodeJS (v24+) installed.
Setup Steps:
- Navigate to the project folder in your terminal.
- Run
npm ito install dependencies. - Run
npm run buildto performn the initial build.
If you’re using wp-env to run the plugin…
1. Run npm run wp-env start to start the docker container.
2. Run npm run start to watch for file changes.
Installation
Frequently Asked Questions
Review feed
Screenshots
Changelog
1.0.1
- Additional minor bug fixes, improve filtering.
1.0.0
- Fixed issues with undo, paste, and default block display.
0.1.0
- Release