January 30, 2019
Displaying an image from an ACF custom field is slightly different on an Archive / Single page, versus on a page, or in a regular loop.
<?php $types = get_terms( array( 'taxonomy' => 'category', 'hide_empty' => true, ) ); foreach($types as $type) { $image = get_field('thumbnail', 'category_' . $type->term_id . '' ); if( in_category($type->term_id )) { echo '<img src="' . $image['url'] . '" /> '; } }