Home › Forums › Front-end Issues › Get Custom Taxonomy Field Value › Reply To: Get Custom Taxonomy Field Value
It’s driving me crazy but I totaly don’t understand how I can get value from custom filed that is custom taxonomy term (select). I read “How to get values from a taxonomy term” 10 times. I search all the forum with words taxonomy custom field. I don’t understand where I can get value of $TermID?
<p><?php the_field(‘field_name’, ‘category_7’); ?></p>
– so tell me please where are you get that “7” ?
I have custom taxonomy called ‘my_taxonomy’ (I use Custom Post Types UI plugin) and I have custom field (my_field – select from taxonomy values list) in custom post (type my_post_type). So I want to post its value in frontend?
Will be appreciate if you colud give the examples or the link to docs or at least turn me to the right way.
1) Get the taxonomy (one value – select or radiobutton) field value?
2) Get the taxonomy (few values – checkboxes) field array of values?
3) Get the repeater nested taxonomy field value?
Thanks in advance
P.S. Sory for my bad english. May be that SQL clear what I want –
SELECT name
FROM wp_terms
WHERE term_id
IN (
SELECT term_id
FROM wp_term_taxonomy
WHERE taxonomy = 'where_from'
AND term_taxonomy_id
IN (
SELECT term_taxonomy_id
FROM wp_term_relationships
WHERE object_id =418 //post_id
)
)
but instead of ” taxonomy = ‘where_from’ ” – value from unknown table that has relationship field_name — taxonomy_name
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.