Home › Forums › Front-end Issues › Insert term if typing in select option new value › Reply To: Insert term if typing in select option new value
You have some issues in your code, for example this
if ($result = term_exists($term, $taxonomy)) {
should probably be
if ($result == term_exists($term, $taxonomy)) {
there are several of this same type of error in the code that you’ve posted.
This is usually why some people code like this
if (term_exists($term, $taxonomy) == $result) {
because the above would create an error if you use ‘=’ instead of ‘==’ rather than fail quietly.
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.