admin管理员组文章数量:1122832
I am using ACF fields to create custom Gutenberg Blocks. I am running into an issue however where I need to go in and out of a container div depending on the block. So I cant just add a container div around the_content();
What I'm trying to do is add a class to each of the standard Gutenberg blocks, so I can add the container styles to each of those blocks, making it easier to go in and out of the container div for better content styling.
Is there a way to accomplish this?
I am using ACF fields to create custom Gutenberg Blocks. I am running into an issue however where I need to go in and out of a container div depending on the block. So I cant just add a container div around the_content();
What I'm trying to do is add a class to each of the standard Gutenberg blocks, so I can add the container styles to each of those blocks, making it easier to go in and out of the container div for better content styling.
Is there a way to accomplish this?
Share Improve this question asked Nov 12, 2018 at 19:31 user9664977user9664977 3775 silver badges12 bronze badges 2- Related / possible duplicates: wordpress.stackexchange.com/a/304145/3898, wordpress.stackexchange.com/a/308044/3898 – Ian Dunn Commented Apr 22, 2019 at 20:21
- This is what group blocks and block styles/variants are meant to do – Tom J Nowell ♦ Commented Nov 18, 2020 at 20:57
1 Answer
Reset to default 1You can use the group block to act as a container for a core block or any other block...
本文标签: How to Add a Container Class to Standard Gutenberg Blocks
版权声明:本文标题:How to Add a Container Class to Standard Gutenberg Blocks 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736286873a1927759.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论