WordPress.org

Forums

Advanced Custom Fields
Custom field for image in Woocommerce? (1 post)

  1. gloriagoldrea
    Member
    Posted 1 year ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Custom Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic