1
我在我的网站的每个类别页面的顶部创建简单的图像横幅的顶部(添加类别标题内容)如何将图像横幅添加到woocommerce店铺基本页面
我想补充一个图像到woocommerce商店基页的顶部。 当我在页面编辑屏幕中插入图像时,它不会出现。 但Woocommerce 2.x无法显示店铺基页摘录(简短描述) 其他正常页面都显示其简短描述。 我该怎么做呢? 我找不到woocommerce商店页面的页面模板
谢谢!
http://wordpress.org/extend/plugins/woocommerce/
我发现了!
插入yourtheme/woocommercer /顶部achive-product.php
//Check is_shop - Shop base page
// if True then Show Category Header Content of The first Product in Shop base Page
if (is_shop()) {
$args = array('taxonomy' => 'product_cat');
$product_categories = get_categories($args );
$term_id = $product_categories[0]->term_id;
$content = get_term_meta($term_id, 'cat_meta');
if(isset($content[0]['cat_header'])){
echo do_shortcode($content[0]['cat_header']);
}
}
希望能帮助别人! :)