Tag: thumbnail url get in wordpress

How to get the post thumbnail URL in WordPress

how to get the post thumbnail URL in WordPress. we use the_post_thumbnail(); function to display post thumbnail. But unfortunately there is no direct function in WordPress to get post thumbnail image url. So we use two functions ( get_post_thumbnail_id(), wp_get_attachment_image_src() ) here to get image URL of post.

  We Used Two functions : 1.

  this will return post thumbnail id, and $post_id is optional If post Read more…