0

How to Get the Post Thumbnail URL in WordPress

Simply paste this code inside the loop code that you are writing. [code language=”css”] <?php $thumb_id = get_post_thumbnail_id(); $thumb_url = wp_get_attachment_image_src($thumb_id,’thumbnail-size’, true); echo $thumb_url[0]; ?> [/code]