Home › Forums › ACF PRO › Perform action by value of field › Reply To: Perform action by value of field
It’s only returning one specific term. I’ll try that out. Thank you very much!
However, in that minute I found a solution that was too simple … I named my graphics exactly like the term names and queried the term name to complete the URL. Like so:
/img/tour-badges/<?php $term = get_field(‘tourcharakter’); if( $term ): ?><?php echo $term->name; ?><?php endif; ?>.png”>
The result is URL/term1.png // URL/term2.png etc. Sometimes you don’t manage to see the forest for all the trees that are in the way (like we say in Germany 😉
Thanks again!
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.