Woocommerce 模板覆盖不起作用 [英] Woocommerce template overriding not working

查看:33
本文介绍了Woocommerce 模板覆盖不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的主题中覆盖 woocommerce 模板.我按照woocommerce的官方文件中的所有步骤进行操作.而且我确定我的主题中没有 woocommerce.php 文件.所以,我无法理解为什么它不起作用.我正在使用 27 个主题.

任何帮助将不胜感激.

解决方案

如果您已经阅读过本文档https://docs.woothemes.com/document/template-structure/><块引用>

请注意:在您的主题文件夹中创建 woocommerce.php 时,您将无法覆盖 woocommerce/archive-product.php 自定义主题中的模板,因为 woocommerce.php 优先于所有其他模板文件.这是为了防止出现显示问题.

还要确保您没有激活模板调试模式",您可以在以下位置找到:

WP 仪表板 -> WooCommerce -> 系统状态 -> 工具

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.

解决方案

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

这篇关于Woocommerce 模板覆盖不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆