Undefined Variable (Displaying image via custom field) October 16, 2022 by Tarik Billa Try this: <?php $imageid = get_post_meta(get_the_ID(), 'athletethumbnail', true); ?> Also, you might want to read this.