最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Add class to group inner container

programmeradmin0浏览0评论

I want to add class to my group block, to the container "wp-block-group__inner-container". I know it's possible to add a div before with render_block, but I want to add bootstrap class like this :

<div class="wp-block-group row">
    <div class="wp-block-group__inner-container col-12 col-lg-10 offset-lg-1 py-3">
    </div>
</div>

How can I do this ?

Thank you !

I want to add class to my group block, to the container "wp-block-group__inner-container". I know it's possible to add a div before with render_block, but I want to add bootstrap class like this :

<div class="wp-block-group row">
    <div class="wp-block-group__inner-container col-12 col-lg-10 offset-lg-1 py-3">
    </div>
</div>

How can I do this ?

Thank you !

Share Improve this question asked Feb 14, 2020 at 14:24 Nicolas LorandNicolas Lorand 237 bronze badges 1
  • it's weird that this question has a video for it: youtube/watch?v=3lzA7yxDcvs – Ooker Commented Feb 27, 2021 at 15:27
Add a comment  | 

1 Answer 1

Reset to default -1

Would using your group class work?

.row > .wp-group-block__inner-container { }

I don't know how to add a class to the inner container but figured I would propose this alternative, hope it helps !

发布评论

评论列表(0)

  1. 暂无评论