I have a field group set up within Meta Box that includes a Single Image type that I am looking to display in my Custom Post Type Post using shortcode on WordPress. Right now, everything displays as expected, except for the image. Below is the section of PHP I am using. I've also included a few reference images for context.
<div>
if ($query->have_posts()) {
while ($query->have_posts()) {
$query->the_post();
$url = get_post_meta(get_the_ID(), 'url', true);
$description = get_post_meta(get_the_ID(), 'description', true);
$lgbtq = get_post_meta(get_the_ID(), 'lgbtq', true);
$woman_owned = get_post_meta(get_the_ID(), 'woman_owned', true);
$minority_owned = get_post_meta(get_the_ID(), 'minority_owned', true);
$size_inclusive = get_post_meta(get_the_ID(), 'size_inclusive', true);
$output .= '<div class="designer-item">';
$output .= '<a href="' . esc_url($url) . '">';
$output .= get_the_post_thumbnail(get_the_ID(), 'medium');
$output .= '<h3>' . get_the_title() . '</h3>';
$output .= '</a>';
$output .= '<p>' . esc_html($description) . '</p>';
$output .= '<ul>';
if ($lgbtq) $output .= '<li>LGBTQ+ owned</li>';
if ($woman_owned) $output .= '<li>Woman-owned</li>';
if ($minority_owned) $output .= '<li>Minority-owned</li>';
if ($size_inclusive) $output .= '<li>Size-inclusive</li>';
$output .= '</ul>';
$output .= '</div>';
}
wp_reset_postdata();
} else {
$output .= '<p>No designers found.</p>';
}
$output .= '</div>';
return $output;
</div>