Support

Account

Home Forums ACF PRO Get values from Taxonomy terms on archive.php page = NULL Reply To: Get values from Taxonomy terms on archive.php page = NULL

  • Thank you.

    Using this:

    $job_term = get_term(get_field('member_person_job'), 'taxonomy-name');
    
    echo $job_term;

    Produces this error:

    http://cl.ly/2v0V0I0l203n

    However, I can get the term using this:

    $job_term = get_the_term_list( $post->ID, 'jobs', '', ',' ); $terms = strip_tags( $terms );

    Based on your comment, the original block used on taxonomy-jobs.php should work, but this still results in NULL:

    $queried_object = get_queried_object(); 
    $taxonomy = $queried_object->taxonomy;
    $term_id = $queried_object->term_id;  
    
    $job_title = get_field('member_person_job', $taxonomy . '_' . $term_id);
    
    echo $job_title;

    By all accounts this should work on the taxonomy page?