Description
Coaderhub Reusable Blocks provides a simple way to create and manage reusable content that can be displayed in different areas of a WordPress website.
Create a reusable content block from the WordPress admin and display it using a shortcode or the provided PHP function.
The plugin uses standard WordPress functionality and keeps frontend output simple so your active theme remains in control of the design.
Content block content is processed using WordPress content sanitization before it is stored and displayed.
Arbitrary JavaScript, CSS, or PHP entered into a content block is not executed by the plugin.
Supported iframe content is restricted to approved HTTPS embed providers.
Features
- Create and manage reusable content blocks
- Use content blocks with shortcodes
- Display content blocks with PHP
- Use block IDs or slugs with shortcodes
- Categories for organizing content
- WordPress revisions
- Featured images
- Preview content
- Duplicate content
- Custom CSS classes
- Simple admin list with shortcode and ID
- WordPress permissions and nonce protection
- REST API support
- Sanitized content output
- Restricted HTTPS iframe embeds
Usage
Create a reusable content block from:
Coaderhub Reusable Blocks > Add New Reusable Block
After publishing, you can use the shortcode:
[coaderhub id=”123″]
Replace 123 with the ID of your reusable content block.
You can also use the block slug:
[coaderhub id=”homepage-cta”]
Additional shortcode attributes are available:
[coaderhub id=”123″ plain=”1″]
You can also specify a wrapper element:
[coaderhub id=”123″ wrapper=”section”]
Custom CSS classes can be added:
[coaderhub id=”123″ class=”homepage-cta”]
PHP Usage
Developers can display a reusable content block from their theme or plugin code using the provided PHP function:
echo coaderhub_show_content_block( 123 );
You can also use a slug:
echo coaderhub_show_content_block( ‘homepage-cta’ );
Optional attributes are supported:
echo coaderhub_show_content_block(
123,
array(
‘plain’ => ‘1’,
‘wrapper’ => ‘section’,
‘class’ => ‘homepage-cta’,
)
);
The PHP function is intended to be called from theme or plugin code.
PHP code entered into a content block is not executed by the plugin.
Privacy
Coaderhub Reusable Blocks does not send content or personal data to external services.
Content is stored using the standard WordPress database.
The plugin does not require an external account or third-party service.
Screenshots




Installation
- Upload the
coaderhub-reusable-blocksfolder to/wp-content/plugins/. - Activate the plugin from the WordPress Plugins screen.
- Open Coaderhub Reusable Blocks from the WordPress admin menu.
- Create and publish a reusable content block.
- Copy the shortcode and add it where needed.
FAQ
-
How do I create a reusable content block?
-
Go to Coaderhub Reusable Blocks > Add New Reusable Block, add your content, and publish it.
-
How do I display a reusable content block?
-
Use:
[coaderhub id=”123″]
Replace
123with your reusable content block ID. -
Can I use a slug?
-
Yes.
[coaderhub id=”homepage-cta”]
The slug can be used instead of the numeric content block ID.
-
Can I use PHP?
-
Developers can display a reusable content block from their theme or plugin code using the provided PHP function:
echo coaderhub_show_content_block( 123 );
PHP code entered into a content block is not executed by the plugin.
-
Can I organize reusable content blocks?
-
Yes. You can organize reusable content blocks using categories.
-
Can I duplicate a reusable content block?
-
Yes. Use the Duplicate action from the Coaderhub Reusable Blocks list.
-
Does the plugin change my theme design?
-
The plugin uses minimal frontend styling and does not attempt to replace your theme’s design. Your active theme or custom CSS can control the appearance of the reusable content.
-
Does the plugin allow custom JavaScript or PHP code in content blocks?
-
No. Content blocks are intended for reusable content. The plugin does not provide a mechanism for executing arbitrary PHP or JavaScript code entered into a content block.
-
Can I add custom CSS to a content block?
-
The plugin allows custom CSS class names to be assigned to a reusable content block. It does not provide a mechanism for entering and executing arbitrary CSS code.
-
Can I use iframe embeds?
-
Supported iframe embeds are sanitized and restricted to approved HTTPS embed providers. Unsupported iframe sources are removed from the content.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Coaderhub Reusable Blocks” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Coaderhub Reusable Blocks” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.1
- Initial release.
- Added reusable content block management.
- Added shortcode support.
- Added PHP function.
- Added categories.
- Added revisions.
- Added preview and duplicate actions.
- Added custom CSS classes.
- Added REST API support.
- Added content sanitization.
- Added restricted HTTPS iframe embeds.
