by Saiful Islam on WordPress.org
Display Gutenberg blocks using shortcode anywhere on your site. Create reusable block templates and embed them with simple shortcodes.

Block Templates Admin: Manage your block templates with easy-to-copy shortcodes
Anywhere Blocks by Shortcode is a powerful WordPress plugin that allows you to create reusable Gutenberg block templates and display them anywhere on your website using simple shortcodes.
[anbsg_block id='123']Basic usage:
[anbsg_block id=’123′]
Alternative parameters:
[anbsg_block template_id=’123′]
[anbsg_block post_id=’123′]
In Posts/Pages:
Simply paste the shortcode in the content editor:
[anbsg_block id=’123′]
In Widgets:
Add a “Custom HTML” widget and insert the shortcode.
In Template Files:
Use the do_shortcode() function:
In Page Builders:
Most page builders support shortcodes in their text/HTML elements.
When editing a block template, you’ll see a “Shortcode” panel in the document settings sidebar. This panel:
* Displays the current shortcode for the template
* Includes a “Copy Shortcode” button for quick copying
* Updates automatically with the post title
`
anywhere-blocks-shortcode/
├── anywhere-blocks-shortcode.php (Main plugin file)
├── autoloader.php (PSR-4 autoloader)
├── app/
│ ├── base.php (Base class)
│ └── functions.php (Utility functions)
├── view/
│ ├── loader.php (View loader)
│ ├── cpt.php (Custom post type)
│ └── shortcode.php (Shortcode handler)
├── src/
│ ├── index.js (Main JavaScript)
│ └── sidebar/ (Editor sidebar components)
└── build/ (Compiled assets)
`
Actions:
* init – Registers custom post type
* plugins_loaded – Initializes plugin
* enqueue_block_editor_assets – Loads editor scripts
Filters:
* the_content – Processes block content
* manage_{post_type}_posts_columns – Adds shortcode column
* Template filters for custom rendering
The plugin follows WordPress coding standards and uses:
* Namespaced classes (ANBS_Block_Shortcode)
* PSR-4 autoloading
* Clean separation of concerns
* Proper sanitization and validation
* WordPress REST API compatibility
For support, feature requests, or bug reports, please visit:
* Plugin URI: https://wordpress.org/plugins/anywhere-blocks-shortcode/
* Author Profile: https://profiles.wordpress.org/codersaiful/
Developed by Saiful Islam (codersaiful)
* Profile: https://profiles.wordpress.org/codersaiful/
* Email: codersaiful@gmail.com
Special thanks to the WordPress community and Gutenberg development team.