WordPress.org

Support

Support » Plugins and Hacks » Custom field for image in Woocommerce?

Custom field for image in Woocommerce?

  • Hi,

    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:

    <?php
    $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.

    Any ideas?

    many thanks,
    G

    https://wordpress.org/plugins/advanced-custom-fields/

  • The topic ‘Custom field for image in Woocommerce?’ is closed to new replies.