I'm trying to create specific Woo templates for product categories in WooCommerce.
I've tried to follow the instructions here but they didn't work for me. Woocommerce single product - template by categories
I also found this but couldn't get it to work. http://wordpress.org/support/topic/plugin-woocommerce-excelling-ecommerce-a-custom-single-product-template
In my theme I have a woocommerce folder with the specific template files that I want to override.
theme/woocommerce/single-product.php
theme/woocommerce/content-single-product.php
theme/woocommerce/content-single-product-custom-1.php
here is part of single-product.php
<?php if (is_product_category( 'custom-1')) {
wc_get_template_part( 'content', 'single-product-custom-1' );
}
elseif (is_product_category( 'promise') {
wc_get_template_part( 'content', 'single-product-custom-2' );
}
else{
wc_get_template_part( 'content', 'single-product' );
}
?>
I have the custom-1 category setup in woo on the specific product I want to target.
When I edit content-single-product-custom-1.php nothing changes. However when I make changes to content-single-product.php they are show up.
Why am I not able to target the my product categories?
Thanks in advance!