• Resolved yann1ck

    (@ja4st3r)


    Hello,

    I am currently using a “classic theme” and I am preparing a slow transition to full site editing. One big difference between classic and block themes is that classic themes have an additional inner container for each group block (wp-block-group__inner-container). I would like to remove that container from the markup, but I dont want to add a theme.json file or use any of the other block theme features at the moment.

    I also at the documented theme-support options but was not able to find an option to deactivate the inner container. I was hoping that there is a undocumented theme support?

    There is an open issue on Github to make the removal of the inner-container optional for block themes (kind of the opposite of my question): https://github.com/WordPress/gutenberg/issues/41124

    I hope someone can help me here.

    Kind regards
    Yannick

    • This topic was modified 2 years, 5 months ago by t-p. Reason: Moved to Fixing WordPress from Developing with WordPress
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @ja4st3r. Try adding this PHP to the theme:

    remove_filter( 'render_block_core/group', 'wp_restore_group_inner_container', 10, 2 );
    

    This should unhook the Core function that adds the inner container when there is no theme.json.

    Thread Starter yann1ck

    (@ja4st3r)

    Hi Robert, that worked like a charm. Thank you very much for your help ??

    Glad to help!

    If your question has been answered, we would love if you would mark this topic as resolved in the sidebar. This helps our volunteers find the topics that still need attention and more people will get helped, possibly like you did.

    Thread Starter yann1ck

    (@ja4st3r)

    Hi Robert, thank you for the reminder. I totally forgot to change the status.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘remove wp-block-group__inner-container for classic theme’ is closed to new replies.