Support

Account

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

  • Well it seems this has quit working:

    <?php 
      $taxonomy = 'product_cat';
      $queried_object = get_queried_object(); 
      $post_id = $queried_object->ID;
      $terms = wp_get_post_terms($post_id, $taxonomy, array('fields' => 'ids'));
      $term_id = $terms[0];
      ?>
       
    			<div class="catback" style="background-image: url('<?php the_field('products_background_image', $taxonomy . '_' . $term_id); ?>');"></div>

    I’m not sure why.
    I have a Category image assigned and Products image assigned under the Category. The image no longer appears.

    Would upgrading to PRO have caused this to stop working?