Gutenberg theme development: how to add “headers” option under styles > colors > elements?
Gutenberg theme development: how to add “headers” option under styles > colors > elements?
Gutenberg theme development: how to add “headers” option under styles > colors > elements?
Custom Block – save.js function not saving attributes
Notion-like editing and layout with a convenient freeform collaborative editor in WordPress? [closed]
Add Custom Alignment Option to WordPress Blocks/Gutenberg
Gutenberg – Prevent Column Nesting in the Visual Editor
I have found my typo – It should be const ALLOWED_BLOCKS = [“grid/item”, “core/image”]; not const ALLOWED_BLOCKS = [“grid/item, core/image”]; If the allowed block type does not exist it only makes sense not to display a button to add more blocks 😀
@drskullster already posted a good answer, but I thought I should share the following which explains why wp_set_script_translations() needs to be called manually: Yes it’s true that WordPress will automatically register and enqueue the block editor script. So we do not need to manually register/enqueue that script! WordPress will also automatically set the script’s translations, … Read more
Classic and block(-based) themes both use the same template hierarchy, so for example in classic themes, we can add a template named single-<post type>.php which would be used as the default template for displaying single posts in a specific post type, and in block themes, the equivalent template is named single-<post type>.html, but that template … Read more
Solved by manually inserting HTML into the template, Thanks.
how to update post meta in a custom field in response to a user interaction in the editor? editPost() can be used for that, but https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#meta-source-deprecated stated that: Although attributes may be obtained from a post’s meta, meta attribute sources are considered deprecated; EntityProvider and related hook APIs should be used instead, as shown in … Read more