Blocks
Registering a block from your theme
The plugin registers the blocks of ugly-blocks/ by itself. You can also do it with WordPress' own function, from functions.php:
add_action( 'init', function () {
register_block_type( get_theme_file_path( 'ugly-blocks/hero' ) );
} );The block gets its fields and its drawing the same way, and it is not registered twice.
Did this article answer your question?
Thank you. It helps us make the documentation better. Need more help?