Structure to work with multiple Gutenberg blocks in plugin. Contains four main blocks.
- WordPress Environment
- Node.js 14.0.0 or later
- Npm 6.14.4 or later.
- It is not compatible with older versions.
Receives an attribute and displays it in frontend.
Show latest posts.
Retrieve and display data from an API.
Slider image.
By default, the WordPress core provides some categories which you can assign to your Gutenberg blocks. However, to keep things organized, can be a good idea to create custom block categories for categorizing your plugin, categorize your blocks based on some features, etc.
To achieve that, you can create your custom block category using the WordPress block filter block_categories_all
.
Example: register_new_category function:
function register_new_category ($categories) {
$categories[] = array(
'slug' => 'custom-category',
'title' => 'Custom Category'
);
return $categories;
}
add_filter( 'block_categories_all' , 'register_new_category');
Clone this repository git clone https://github.com/sarahcssiqueira/wxyz-blocks
or download the latest release.
Run npm install
&& npm run build
Run composer install
This project is licensed under the license GPLv2 or later.