Sorry a noob question. I wish to make this:
<?php do_action('woocommerce_product_thumbnails'); ?>
Conditional to a custom field called 360 with the value yes.
<?php // do_action('woocommerce_product_thumbnails'); // ?>
For the simple reason that my plugin uses 36 images to create a rotating display.
When I dont use the plugin, I want to use the thumbnails. Many thanks Asa.
I have tried
<?php
if (get_post_meta($post->ID, '360', false)) {
do_action('woocommerce_product_thumbnails');
} else {
do_action('woocommerce_product_thumbnails');
}
?>
But I still get to see the thumbnails when 360 is returned as false?
I have tried
<?php
if (get_post_meta($post->ID, '360', true)) {
// do_action('woocommerce_product_thumbnails');
} else {
do_action('woocommerce_product_thumbnails');
}
?>
Works! Many thanks.
I think this is what you mean – if there is a value for the custom meta value of 360 (ie you’d created a custom metabox with a checkbox with id 360 in it) for that page/post then the product thumbnails are used. If not then you put in your rotating display.