single-product.php override is ignored
-
Using Woocommerce 2.4.10 in a local development. I’ve found instructions on overriding single product template: in my theme’s woocommerce folder for overrides, if I edit ‘content-single-product.php’ the changes take effect, so I know overrides are in the right place.
What I want eventually is a separate template for glass products, so I’ve saved a template called ‘content-single-product-crystal.php’ (a slightly tweaked ‘content-single-product.php’). Then in ‘single-product.php’, just to check it’s working at first I’ve changed
<?php wc_get_template_part( 'content', 'single-product' ); ?>
into
<?php wc_get_template_part( 'content', 'single-product-crystal' ); ?>
but my crystal template is ignored.
I’ve tried doing the same changes to the original woocommerce ‘single-product.php’ but that doesn’t work either (restored that file to its original state now). I’ve even tried deleting other chunks of ‘theme>woocommerce>single-product.php’ to see if the file’s being used, but that does nothing either.
In ‘admin > woocommerce > system status’ at the bottom where it lists template overrides it lists ‘single-product.php’ and ‘content-single-product.php’, but should it also list my ‘content-single-product-crystal.php’ ? (it doesn’t).
Must be going mad but can’t see what I’m doing wrong… Sorry I can’t post a link, as it’s not live yet.
- The topic ‘single-product.php override is ignored’ is closed to new replies.