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!
© 2022 Advanced Custom Fields.