Thanks John.
I’m getting closer but having issues outputting the image.
My echo code must be wrong. Any ideas?
<?php
$args = array(
'post_type' => 'post', // or your post type
'posts_per_page' => -1, // get them all
'meta_query' => array(
array(
'key' => 'logo',
'value' => '',
'compare' => '!='
)
)
);
$query = new WP_Query($args);
if ($query->have_posts()) {
global $post;
while ($query->have_posts()) {
$query->the_post();
echo '<img src="' . the_field('logo') . '"></img>';
}
wp_reset_postdata();
}
?>