WordBlocks includes standalone reusable block rendering helpers so you can output saved reusable blocks in templates, theme files, and content without rebuilding layout markup.
WordBlocks provides one shortcode and one PHP helper function for rendering reusable blocks (post type wp_block) by ID.
| Type | Syntax | Inputs | Behavior |
|---|---|---|---|
| Shortcode | [wordblocks_pattern id="123"] |
id (required, reusable block post ID) |
Renders the reusable block content, processing nested shortcodes and blocks. |
| PHP Function | <?php wordblocks_pattern( 123 ); ?> |
int $post_id (required, reusable block post ID) |
Outputs sanitized rendered HTML for the target reusable block directly in PHP templates. |
Reusable block snippets are ID-based, so your workflow should make it easy to locate the correct reusable block ID and keep that ID stable across environments.
Add or edit a reusable block in WordPress (post type wp_block).
Use the WordBlocks column on the reusable block list to copy shortcode or PHP snippets.
Use shortcode in post/page content or the PHP helper in theme template files.
Pair this reusable-block snippet reference with MIME controls and API docs for complete plugin feature coverage.