Support

Account

Home Forums General Issues Retrieving fields for category pages Reply To: Retrieving fields for category pages

  • Nevermind, the following worked:

    <?php 
     
    // vars
    $queried_object = get_queried_object(); 
    $taxonomy = $queried_object->taxonomy;
    $term_id = $queried_object->term_id;  
     
    // load thumbnail for this taxonomy term
    $thumbnail = get_field('background_image', $taxonomy . '_' . $term_id);
     echo $thumbnail;
    ?>