Skip to content

Instantly share code, notes, and snippets.

@guillermorangel
Last active December 30, 2015 12:09
Show Gist options
  • Save guillermorangel/7827108 to your computer and use it in GitHub Desktop.
Save guillermorangel/7827108 to your computer and use it in GitHub Desktop.
<?php
//wp_get_attachment_image_src( $attachment_id, $size, $icon );
$featureimage = wp_get_attachment_image_src( get_post_thumbnail_id() );
$featureimage_url = $featureimage[0];
echo $featureimage_url;
// https://css-tricks.com/snippets/wordpress/get-featured-image-url/
$thumb_id = get_post_thumbnail_id();
$thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail-size', true);
$thumb_url = $thumb_url_array[0];
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment