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!
📣 “ACF Chat Fridays”— Advanced Custom Fields (@wp_acf) January 31, 2023
The ACF team holds their first open office hours this Friday! Come and talk ACF, and ask questions about building sites with the plugin.
We’d love to see you there!
📆 Friday 3rd Feb - 3pm UTC
👉 Register here - https://t.co/3UtvQbE4CU pic.twitter.com/oTwW9K1XQ0
© 2023 Advanced Custom Fields.