Initially the Product Category page is divided into
I have removed the side bar area using function.php. However the content area is still in 70%.
I am looking for a code with the condition in php, "If the chosen url is a Product Category with two depths, then ensure the page is full width 100%".
What is needed: Full Width is needed for:
- www.someexample.com/product-cateogry/firstdepth/
- www.someexample.com/product-category/firstdepth/seconddepth/
full width is NOT needed for:
- www.someexample.com/product-category/firstdepth/seconddepth/thirddepth
My code are below (does not work):
funtion.php:
add_filter( 'body_class', 'product_categories' );
function product_categories( $classes ) {
if (is_product_category('sanitaryware') && is_product_category('Faucet')) {
$classes[] = 'product-category';
}
// return the $classes array
return $classes;
}
style.css:
.ifproduct-category #content {
width: 100%;
float: none;
}
Information: WordPress | Woo-commerce | Theme name: Storefront