WordPress.org

Forums

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

  1. gloriagoldrea
    Member
    Posted 9 months 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/

Reply

You must log in to post.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 9 months ago by gloriagoldrea
  • This topic is not resolved
  • WordPress version: 3.9.1