I am developing a woocommerce related theme and issue I am facing is that when ever I go to shop page or any page it changes my layout. It removes my .container
class and convert that class to #container
id and so my 1170px layout is not showing up and all my data is 100%.
I am new to woocommerce kindly guide me how to fix this?
My container class is working fine on all other pages instead woocommerce.
Yes, I got it by my self. That was due to just because I was showing posts from WooCommerce Plugin templates and that’s default behavior of the WooCommerce. I just copied
archive-product.php
page to my theme directory and wrapped all code inside my all content and it worked like a charm 🙂Hope, that will solve problems of any new comer like me …
Your problem is not located on woocommerce templates like suggest your answer, but in the
woocommerce.php
file located in your active theme folder.There you will need add in the
id="container"
html tag all occurrences, aclass="container"
. For example:Will need to be replace by:
Or by:
This will solve your issue.
Another solution without editing this
woocommerce.php
file is adding for example a jQuery script like this: