A “multi-block plugin” in WordPress refers to a custom plugin that provides multiple, individual content blocks within the WordPress Block Editor (Gutenberg). Each block represents a unique piece of content (like text, images, or interactive components) that users can add to their pages and posts. This setup is ideal for users looking to expand their content creation options without creating separate plugins for each block.
An example of a multi-block plugin for WordPress. This example includes two blocks: one for displaying a custom message (Block One) and another for adding a button (Block Two).
Plugin Structure sample
Create a folder in wp-content/plugins/ called my-multi-block-plugin, with the following structure:
my-multi-block-plugin/ ├── my-multi-block-plugin.php ├── src/ │ ├── blocks/ │ │ ├── block-one/ │ │ │ ├── index.js │ │ │ ├── block.json │ │ ├── block-two/ │ │ │ ├── index.js │ │ │ ├── block.json │ ├── index.js └── build/