wp scaffold block <slug>

Generates PHP, JS and CSS code for registering a Gutenberg block for a plugin or theme

Arguments

NameDescription
slugThe internal name of the block

Options

NameDescription
--title <title>The display title for your block
--dashicon <dashicon>The dashicon to make it easier to identify your block
--category <category>The category name to help users browse and discover your block
--themeCreate files in the active theme directory. Specify a theme with --theme=<theme> to have the file placed in that theme
--plugin <plugin>Create files in the given plugin’s directory
--forceOverwrite files that already exist