Home › Forums › General Issues › want to display Category Image in loop › Reply To: want to display Category Image in loop
Hi @pagol
Could you please tell me where did you add the custom field? Was it the product category or the normal post category?
ACF doesn’t have a function called get_image()
, that’s why you got the error message. Could you please try to set the ID manually like below?
$image = get_field('cat_thumbnail_image', 'category_99');
print_r($image);
Where ’99’ is the ID of the category. If it works, then there’s something wrong with your $category
variable.
Thanks 🙂
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.