问题
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