Custom field for image in Woocommerce?
I’m having trouble using this plugin to make a custom field that works with Woocommerce. I got the code to work for regular posts:
$image = get_field(‘name_of_field’);
if( !empty($image) ): ?>
<img src=”<?php echo $image[‘url’]; ?>” alt=”<?php echo $image[‘alt’]; ?>” />
<?php endif; ?>
But this isn’t working for a category archive page in Woocommerce.
- The topic ‘Custom field for image in Woocommerce?’ is closed to new replies.