Get the URL of Post Thumbnails


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $image_id = get_post_thumbnail_id();
  2. $image_url = wp_get_attachment_image_src($image_id,'large');
  3. $image_url = $image_url[0];

URL: http://www.leewillis.co.uk/getting-url-post-thumbnails-wordpress/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.