Home Forums Front-end Issues Custom Field Not Displaying in Front End Reply To: Custom Field Not Displaying in Front End

  • Okay. You’re dealing with an idiot here.

    I’ve added another field under the Category Background Image Custom Field so when the user chooses the Category Background image, they can also add the Product Background image (the settings are the same as the Category Background Image field) so all products under that one category will share the same image. This is logical.

    But I’m wondering if that makes a difference in the call in the template.

    I’m using the same code, but changed to post the ‘product’ image field:
    <div class=”catback” style=”background-image: url(‘<?php the_field(‘products_background_image’, $taxonomy . ‘_’ . $term_id); ?>’);”></div>

    But it comes up blank. Why would it make much difference which field I’m calling if it’s for a specific taxonomy?