Home › Forums › General Issues › Displaying image in WooCommerce product category. › Reply To: Displaying image in WooCommerce product category.
actually, what you have in your code here, either of them, should work if the image is added to the category.
$foto = get_field( 'foto', $queried_object );
$foto = get_field( 'foto', $taxonomy . '_' . $term_id );
but this will be false since it’s not using one of the two values for post ID from above
if( get_field('foto') ) {
pick one of the first two and use it for all acf calls
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.