Home › Forums › Backend Issues (wp-admin) › Select taxonomy by name instead of id in Relationship field › Reply To: Select taxonomy by name instead of id in Relationship field
Thanks @hube2! 🙂
I doubted that, too.
Using `$term_guests = get_term_by(‘name’, ‘Guest’, ‘categories’);
$term_id_guests = $term_guests->term_id;`
solved my problem. I didn’t really follow the part about acf/load_field, but I put the code in functions.php after registering the term and before registering the ACF fields, so I think there is no need (especially since it works).
Of course, I understand, that’s why I said it was meta.
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.