How to disable the Code Editor in Gutenberg?
How to disable the Code Editor in Gutenberg?
How to disable the Code Editor in Gutenberg?
Unfortunately, this is not documented at all. It took a while for me to get the answer by inspecting the code, and it is: in browser console you can test at first: wp.data.select(‘core’).getUser(1,{context:’view’}) where 1 is ID of the user. You can also omit context, to get all meta data available from REST, or give … Read more
When creating a page template in Appearance > Editor you can add a Post Content block. This is where the page content goes. Everything else is part of the template and applies to all Pages that use the template. When you go to Pages > All Pages and select a page to edit, or use … Read more
From the docs https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/ I would say you have to provide template also for that option, though I never used it. I recommend you to get yourself more familiar with block development, it is very clear if block is dynamic or static, if it has php callback for rendering instead of save procedure in javascript, … Read more
Here’s why did you get an undefined The function itself was defined, but the function call (wp.blocks.getBlockVariations( ‘core/embed’ )) returned an undefined because by the time that you called the function, the block/Gutenberg editor had not yet been initialized. Hence, undefined was returned instead of an array of block variations, because core block types like … Read more
You may use the following code (either in your active theme’s functions.php file or in a custom plugin): // This line is preferably be added to your theme’s functions.php file // with other add_theme_support() function calls. add_theme_support( ‘disable-layout-styles’ ); // These two lines will probably not be necessary eventually remove_filter( ‘render_block’, ‘wp_render_layout_support_flag’, 10, 2 ); … Read more
The new FSE editor uses a new filter, if you want to hook into that you can do it in two ways: By hooking the individual block rendering: add_filter( ‘render_block_core/navigation-link’, ‘test_render_navigation_link’, 10, 3); function test_render_navigation_link($block_content, $block) { $attributes = $block[“attrs”]; // string replace the href if you want, by checking the content of $attributes return … Read more
Replace block content with an array
Block editor not loading with rest api custom code
Strange behavior of blocks in the editor