我在一个客户网站上安装了wooccommerce插件,它与wooccommence不兼容,所以我做了所有需要的配置,比如:
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10);
function my_theme_wrapper_start() {
echo '<td id="content" class="narrowcolumn">';
}
function my_theme_wrapper_end() {
echo '</td>';
}
add_theme_support( 'woocommerce' );
但是Woocommerce.css仍然没有应用到我的产品页面是元素,而且结账按钮也没有出现。
这是一个链接到页面:
http://www.doctor-detail.com/product/gift-card-product-2
任何帮助都将不胜感激!
使用开发工具检查元素,会出现以下错误:
未能加载资源:服务器的响应状态为500(内部服务器错误)http://www.doctor-detail.com/wp-content/themes/mandingo/assets/js/frontend/add-to-cart.min.js未能加载资源:服务器的响应状态为500(内部服务器错误)http://www.doctor-detail.com/wp-content/themes/mandingo/assets/js/frontend/single-product.min.js未能加载资源:服务器的响应状态为500(内部服务器错误)http://www.doctor-detail.com/wp-content/themes/mandingo/assets/js/frontend/add-to-cart-variation.min.js
你忘了把文件夹复制到你的主题中了吗?
感谢大家的帮助,尤其是@imaginate。
我通过在我的主题是主文件夹中创建一个woommerce.php文件来解决这个问题,并将主题是page.php文件的所有内容复制到woommerces.php,就像这里的文档中提到的那样:
http://docs.woothemes.com/document/third-party-custom-theme-compatibility/
我用代替了他们说的循环
<?php woocommerce_content(); ?>
但文档似乎需要更新,因为它也不是这样工作的,所以我这样添加它:
<div class="woocommerce">
<?php woocommerce_content(); ?>
</div>