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:
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?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
ACF’s Repeater field is a versatile solution for repeating content in #WordPress.
— Advanced Custom Fields (@wp_acf) December 29, 2022
What’s your favorite use case for the Repeater field?
What’s the weirdest thing you’ve ever used it for?
Let us know!👇
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.