For our customization want to get post thumbnail URL in WordPress by post ID then use the following code.

$url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );

Have any doubt, then comment here!

Leave a Reply

Your email address will not be published. Required fields are marked *