Get a post’s thumbnail url or display default image in shortcode
I checked it out further and there were a couple of problems with your code. your if statement checks for a post ID, but you don’t have a check for whether or not there is actually a featured image set, so I added a condition to the if statement your closing bracket for get_post_thumbnail_id() was … Read more