Get featured image url from post id in WordPress, for when you’re to lazy to google it. This includes a custom image size as well.
1 2 3 4 |
$image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID ), 'large'); if($image){ echo '<img src="' . $image[0] . '">'; } |