I want to get image full path so that I can apply it in the src attribute of image element.
What I am getting right now is the image, generated from function: the_post_thumbnail(); which I can’t apply to image element.
What I did so far is:
<?php
$d=get_cat_ID( 'news' );
$catquery = new WP_Query( 'cat='.$d.'&posts_per_page=1&order=DESC' );
while($catquery->have_posts()) : $catquery->the_post();
the_post_thumbnail();
endwhile;
?>
And what I want is; path of image with its name as below:
http://example.com/folder1/wp-content/uploads/2013/12/image.jpeg
You can get real image path of thumb image using wp_get_attachment_image_src,