Woocommerce template overriding not working

孤者浪人 提交于 2020-05-30 06:33:26

问题


I want to override woocommerce templates from my theme. I follow all the steps from the official documents of woocommerce. And I'm sure that there is no woocommerce.php file in my theme. So, I can;t understand why it isn't working. I'm using twenty seven theme.

Any help will be appreciated.


回答1:


If you've already read this documents https://docs.woothemes.com/document/template-structure/

Please Note: When creating woocommerce.php in your theme’s folder, you will be unable to override the woocommerce/archive-product.php custom template in your theme, as woocommerce.php has priority over all other template files. This is intended to prevent display issues.

Also make sure that you don’t have “Template Debug Mode” activated that you can find under:

WP Dashboard -> WooCommerce -> System Status -> Tools




回答2:


After lots of researching, finally I've found my answer from here WordPress - Failing to override woocommerce templates

Actually, I use all of my files inside the template folder and this is the reason why it didn't work.

So simple steps. But I can't understand how was I miss it!

Thank's Mo'men Mohamed for your suggetions.




回答3:


Try to declare Woocommerce support in your theme's function.php



来源:https://stackoverflow.com/questions/45848547/woocommerce-template-overriding-not-working

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