Home › Forums › Front-end Issues › Display field of taxonomy term outside the loop › Reply To: Display field of taxonomy term outside the loop
It works !
I had to set category_{id} as second parameter of the_field().
but to be honest I don’t understand why, the documentation says nothing about this, so if someone can turn on the light…
the documentation :
th_field($selector, [$post_id], [$format_value]);
the_field('cat_img', 'category_'.$child->term_id);
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.