首页 文章

Woocommerce archive-product.php覆盖不使用underscores.me主题

提问于
浏览
2

我做了这些事情,我已经仔细检查了所有的事情

在插件/ woocommerce / templates / archive-product.php中

我刚刚复制到my-themes / woocommerce / archive-product.php来覆盖核心woocommerce文件 .

但是在我尝试了很多次之前它只能用underscores.me工作但它工作但是在最新的更新中它不起作用

WC版本:3.3.5服务器信息:Apache / 2.4.18(Ubuntu)PHP版本:5.6.33-3 ubuntu16.04.1 deb.sury.org 1

my_theme/woocommerce/archive-product.php, 

my_theme/woocommerce/content-product.php, 

my_theme/woocommerce/content-product_cat.php, 

my_theme/woocommerce/content-single-product.php, 

my_theme/woocommerce/myaccount/form-login.php, 

my_theme/woocommerce/single-product/add-to-cart/variable.php, 

my_theme/woocommerce/single-product/meta.php, 

my_theme/woocommerce/single-product/short-description.php, 

my_theme/woocommerce/single-product.php, 

my_theme/woocommerce/taxonomy-product_cat.php

1 回答

  • 7

    我只需要进行一些研究后我们需要将下面的函数添加到我们的主题functions.php文件中

    add_theme_support( 'woocommerce' );
    

    请阅读此页面,你也会对主题支持和其他事情有所了解https://pmgarman.me/add-woocommerce-support-to-underscores/它正在为我工作,带有underscores.me主题

相关问题