I did this in the function.php of my theme and it worked like a charm.
Note: I am only missing the id, maybe someone can share a solution for that too.
function custom_render_block_core_group (
string $block_content,
array $block
): string
{
if (
$block['blockName'] === 'core/group' &&
!is_admin() &&
!wp_is_json_request()
) {
$html="";
$tag = $block['attrs']['tagName'] ?? 'div';
$html .= '<' . $tag . ' class="' . $block['attrs']['className'] . '">' . "\n";
if (isset($block['innerBlocks'])) {
foreach ($block['innerBlocks'] as $inner_block) {
$html .= render_block($inner_block);
}
}
$html .= '</' . $tag . '>' . "\n";
return $html;
}
return $block_content;
}
add_filter('render_block', 'custom_render_block_core_group', null, 2);
Credits and original solution here
Related Posts:
- Allow excerpt for pages in Gutenberg?
- WordPress Gutenberg Embed Blocks Are Not Responsive
- How to query multiple post types inside Gutenberg options panel?
- Implementing Gutenberg RichText onSplit / onReplace
- Gutenberg moving core blocks between categories
- Reset data when the field is cleared
- Is there a hook or filter yet for Gutenberg Block Editor to not auto-add Noreferrer to links with a target?
- How to remove specific panels in the editor (Gutenberg) when editing a block (via right panel)?
- Is it possible to use to create a “switchable” preview of a Carousel Gutenberg block?
- What is the significance of ‘root’ in getEntityRecords?
- How to Disable Gutenberg & Return to the Classic WordPress Editor Without any Plugins
- Gutenberg default value not saved in json
- Change default colors in paragraph block settings
- Gutenberg Reusable Block of WordPress
- Add custom attributes to link in Gutenberg
- How do I add a Gutenberg editor to a custom options page
- Custom Gutenberg Block: Excluding an allowed block from InnerBlock’s templateLock={‘all’}
- Determine if block has already been registered
- InnerBlocks breaks Flexbox and CSS Grid styles
- Is there a way to set the gutenberg color palette outside the theme?
- Gutenberg get withState variable in save function
- Gutenberg block JavaScript localisation on Polyglots does not work
- how define elements type in attributes type array of gutenberg blocks
- Convert GMT time to local time in Gutenberg Block Editor
- Restrict heading level in Gutenberg block `core/heading`
- How do I disable or hide the Layout block setting in the Group block
- Cleaning up after block dismount
- I cant see Block Editor with v5.7
- How to update block attribute after format is applied?
- How to add a class to the link of the default Gutenberg Button block?
- How to identify what templates are being loaded in a block-based theme [closed]
- Check if current page is using blocks (Gutenberg) or is legacy
- Add support for ‘alignnone’ to Gutenberg block align controls?
- How do I replace a audio gutenberg block to native audio wordpress
- Converting a theme to Gutenberg but some styles are missing in the front end [closed]
- React useEffect not work in frontend gutenberg blocks
- Gutenberg Block language translation does not work
- How to generate block ID for use in post_content JSON data
- Where in a WordPress installation is the code for the default Gutenberg blocks located? [duplicate]
- Display selected image in the MediaPlaceholder component
- ACF and Gutenberg block, how to use blocks without ?
- Submitting a block to the .org repo: do I submit compiled code, or source code? [closed]
- Using 2 HTML blocks in Gutenberg to wrap content with div
- Add button to Block toolbar: toggleFormat is undefined
- In a block transform, how do I insert innerBlocks?
- What is the name of the user capability to read a reusable block?
- Gutenberg – Prevent Column Nesting in the Visual Editor
- How to remove whitespaces from source of posts created through WordPress Gutenberg editor
- Gutenberg blocks (block editor) with get_the_excerpt and get_the_content, using ACF
- Basic use of useState
- Gutenburg: Remove border of selected block
- Sort Posts by Sticky then by Latest date using the Latest Posts Block
- Unwanted white space next to inputs added within `PluginDocumentSettingPanel` using “
- apiFetch() returns infinite requests
- ToolbarDropdownMenu component missing from @wordpress/scripts package
- Gutenberg Custom Block Not Validating – Ideas?
- Gutenberg dynamic block render_callback gives null for $post
- Editing HTML structure of Gutenberg layout recent post?
- How to add srcdoc attribute to YouTube oEmbed in Gutenberg oEmbed Block
- Pass props / function to InnerBlocks
- Categories in Gutenberg
- Block editor: content resets to the previous state in “Edit as HTML” by clicking somewhere outside of the editing window
- Possible to add the title of a custom gutenberg block to the edit screen?
- Post Format Link using Guttenberg
- How do I hide the UI for specific Gutenberg Blocks?
- Creating a Dynamic InnerBlock that updates depending on state
- Resizing images on page
- When to use removeEditorPanel()
- Error After Installing Gutenberg plugin (caused by attempt to stop WP from stripping out tags)
- Block validation failed – escaped HTML in content save
- Add media dynamically on gutenberg block
- FormTokenField passing objects to value property
- Trying to save an object into post meta with wp.data.dispatch(‘core/editor’).editpost
- Core Block Columns Attributes for Innerblocks Template
- WordPress – Increase number of posts in “Add Link” dialogue
- How to condition appearance of a gutenberg block via wp_is_mobile
- Can I strip WordPress classes from blocks?
- How to display dynamic block editor on front-end?
- How to list all registered blocks
- Enable varying text for Phone, Tablet and Desktop
- Debouncing Input value with block attributes
- How to automatically reload style variant .json?
- Using the block theme in production
- Pass component name in onChange [closed]
- Add another option to default link control settings panel?
- Strange behavior of blocks in the editor
- Block editor not loading with rest api custom code
- With full-site-editing menus, how do I create a non-linking top-level menu item with linking sub-pages
- In Full Site Editing, how do I get the templates I created to appear in the site editor when populating a new page?
- How can I render a built-in Gutenberg block with InnerBlocks outside of the block editor?
- How do I add filters in Twenty-Twenty-Three without a functions.php?
- Dynamically add table of contents and add anchor based on heading innerHTML
- How to defer block.json scripts?
- Different style options for the same block depending where it is used
- How to extract ‘intro’ block from page content, but later strip from page main content
- Block validation: Block validation failed – Custom WordPress Gutenberg Block Fails In Editor when reloaded
- Add a new option to Social Link block
- How can I prevent a user from selecting exactly one of two (not both or none) categories on a post?
- How to add a tooltip for MediaReplaceFlow from @wordpress/block-editor
- $attributes not defined in block.json PHP template for ACF blocks