I would like to get the image source of post thumbnails for a js slider I’m trying to integrate.
try following code
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'post-thumbnail' ); $url = $thumb['0'];
You should change “thumbnail_size” to your name of the thumbnail size if you are not using default