Woocommerce 更改商业/产品类别页面的背景
我似乎找不到如何更改woocommerce/产品类别页面的背景。我使用以下css更改了归档和单个产品页面:Woocommerce 更改商业/产品类别页面的背景,woocommerce,css,Woocommerce,Css,我似乎找不到如何更改woocommerce/产品类别页面的背景。我使用以下css更改了归档和单个产品页面: .woocommerce.post-type-archive-product { background-image:none !important; } .woocommerce.single-product { background-image:none !important; } 这工作很好,但是的,我不能让它与分类页面的工作 谢谢您的帮助。请在functions.php中
.woocommerce.post-type-archive-product {
background-image:none !important;
}
.woocommerce.single-product {
background-image:none !important;
}
这工作很好,但是的,我不能让它与分类页面的工作
谢谢您的帮助。请在functions.php中尝试此代码
if(is_product_category()){
add_action('wp_head',function(){
?>
<style>
.woocommerce.post-type-archive-product {
background-image:none !important;
}
.woocommerce.single-product {
background-image:none !important;
}
</style>
<?php
});
}
if(是产品还是类别()){
添加操作('wp_头',函数(){
?>
.woocommerce.post-type-archive-product{
背景图像:无!重要;
}
.单一产品{
背景图像:无!重要;
}
请在functions.php中尝试此代码
if(is_product_category()){
add_action('wp_head',function(){
?>
<style>
.woocommerce.post-type-archive-product {
background-image:none !important;
}
.woocommerce.single-product {
background-image:none !important;
}
</style>
<?php
});
}
if(是产品还是类别()){
添加操作('wp_头',函数(){
?>
.woocommerce.post-type-archive-product{
背景图像:无!重要;
}
.单一产品{
背景图像:无!重要;
}
哪个不行?哪个不行?