bev
posted this
02 April 2016
I have one category of products which require a completely different page layout in the product details page to the rest. I have managed to create a second Product Detail template in Themler but now need to get Woocommerce to recognise when to apply the alternative template.
In the single-product.php file, I thought to add an if else statement it would find the new template but cannot seem to get it to work.
if(is_product_category('CATEGORY NAME') ) {
theme_load_template('Product Overview', 'product-details-2');}
else
{theme_load_template('Product Overview', 'productOverview');}
?>
Would really appreciate if anyone can spot what I am doing incorrectly or who have a better solution?
Many thanks
Bev
I have one category of products which require a completely different page layout in the product details page to the rest. I have managed to create a second Product Detail template in Themler but now need to get Woocommerce to recognise when to apply the alternative template.
In the single-product.php file, I thought to add an if else statement it would find the new template but cannot seem to get it to work.
if(is_product_category('CATEGORY NAME') ) {
theme_load_template('Product Overview', 'product-details-2');}
else
{theme_load_template('Product Overview', 'productOverview');}
?>
Would really appreciate if anyone can spot what I am doing incorrectly or who have a better solution?
Many thanks
Bev
Last edited 02 April 2016 by bev
Vote to pay developers attention to this features or issue.