0

I using the Timber Starter Theme for my website and would like to group multiple blocks through the Gutenberg block editor. Unfortunately, the group option isn't available. I'm wondering what needs to be activated for the option to become available.

Based on this article I tried to explicitly allow core/group, but this didn't make any difference.

So my assumption is, that I need to activate the whole functionality for the theme. Similar to add_theme_support( 'post-thumbnails' ); but my research about it was unsuccessful so far. I'm grateful for hints about it.

4
  • this functionality does not need activating, it's there by default. If it isn't that implies that either it's a very old version of WordPress, or something you haven't found has removed it. Though if you've chosen to use Timber and build your site using Twig templating does it make sense to use blocks at all? Note that the allowed_block_types_all filter can be used to replace the list of blocks allowed, a lot of the time the list is a true/false value and only contains a list of blocks if another plugin or theme has tried to enforce a strict list
    – Tom J Nowell
    Commented Jun 10 at 9:28
  • Thanks @TomJNowell for your comment! I've set up a new installation to try things out and it seems like I broke something and therefore groups aren't available. Haven't figured out yet what it was. When only copy&paste files, the fresh install is fine, as soon as I transfer the DB, things are broken ... Regarding Twig and blocks: I use blocks in the back-end and Twig helps me to build the front-end. How would you set up the back-end when using Twig?
    – obs
    Commented Jun 11 at 8:10
  • 1
    I'd undo the steps you'd taken 1 by 1 until the group block returns. I'm not familiar enough with Twig so you'd need to discuss that in a Twig/Timber community. To clarify and reiterate though, groups are there by default, their removal is something that would need to be deliberatley done by code. The only other thing I can think of is that you've gone into the editors preferences menu, gone to blocks, and unchecked groups in the block visibility list so they don't appear, this is the only non-code way I've been able to reproduce your problem
    – Tom J Nowell
    Commented Jun 11 at 9:39
  • Turned out the block was disabled. Thank you so much for pointing me in this direction. I've spent so many hours on this ...
    – obs
    Commented Jun 11 at 18:15

1 Answer 1

1

The block might be disabled in the editors user preferences, go into the editor and using the 3 dot menu in the top right, open the editor settings. Then navigate to the blocks menu and check that groups hasn't been hidden. If it has then reset or unhide it and your group option should return.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.