A simple starter plugin for serverside block rendering.
- change the name of the folder 'serverside' to reflect your plugin name, change the key "name" reference in the package.json to the same name
- search and replace all references to 'my_block' and replace with your own reference
- search and replace all references to 'my-block' and replace with your own reference
- search and replace all references to 'My Block' and replace with your own reference
- replace the description in the package.json with a description of your plugin
- Upload to the
/wp-content/plugins/
directory - Activate the plugin through the 'Plugins' menu in WordPress
- Place a block in your post/page
The intention of this plugin is to be used as a starting point for serverside rendering, the serverside rendering functionality happens in the 'render_callback' function set in the 'register_block_type' parameter, to modify the behaviour of the rendering you should use the changed render callback function renamed from 'my_block_plugin_render' to your chosen reference.