Modify core/image block by adding inner span to figcaption in save
Modify core/image block by adding inner span to figcaption in save
Modify core/image block by adding inner span to figcaption in save
The only I can think of is to use [parse_block()][1] and [render_block()][1] parse_block will parse html blocks into an array, and render_block will convert an array into content. Here is an example of how you can achieve what you want using the above functions (code not tested): <?php if (has_post_thumbnail()) { the_post_thumbnail(); } ?> <?php … Read more
Gutenberg get list of all custom image sizes
Your PHP registers a block with 6 attributes. Your JS registers a block with 10 attributes. They must match, it is non-negotiable. You can’t claim one thing in PHP then say another in javascript. Your code lied to one of the APIs. You can either: add the missing attributes to PHP or remove the extra … Read more
Debugging Gutenberg block with the React Profiler (React Developer Tools)
add_editor_sytle adds callback for custom TinyMCE editor stylesheets. and you want to style blocks in block editor, not TinyMCE editor. use wp_register_style and it is by default enqueue to all media screens. then register this style for any block you want to style using register_block_style. try something like this: add_action(‘init’, function() { wp_register_style(‘awp-block-styles’, get_template_directory_uri() . … Read more
WordPress does not hide content after “Read more” block added using gutenberg editor
How to Disable “Block Recovery” for HTML Blocks in Gutenberg
How to Change the Gutenberg editor’s colors?
apiFetch() returns infinite requests