how to remove woocommerce container div '<div class=“woocommerce”>'

心不动则不痛 提交于 2021-02-07 21:15:56

问题


I have created a custom theme for woocommerce an copied templates folder to my theme rootwoocommerce. now I figured that all pages in woocommerce has a div container with class woocommerce. I want to change the class of it or remove that from my theme. I searched in my theme files <div class="woocommerce"> and I found nothing. ! is there any way to change or delete that?


回答1:


No, you can't change or delete, which could break everything, read more here - https://github.com/woocommerce/woocommerce/issues/12191.




回答2:


You can't find because the word <div class="woocommerce"> may be a parameter of a rendering function (example: <div class="<?php echo $param">) and you must find where php code is placed instead. When you get where it is placed, just add your class after parameter (example: class="<?php echo $param?> your-class") to access this element



来源:https://stackoverflow.com/questions/51569322/how-to-remove-woocommerce-container-div-div-class-woocommerce

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!