Skip to content

Instantly share code, notes, and snippets.

@ajtroxell
Created June 14, 2013 18:47
Show Gist options
  • Save ajtroxell/5784258 to your computer and use it in GitHub Desktop.
Save ajtroxell/5784258 to your computer and use it in GitHub Desktop.
<?php echo gangmei_get_the_post_thumbnail_url($post->ID, 'large'); ?>
<?php
// Get only the image url link by http://blogcastor.com from http://ajtroxell.com
function gangmei_get_the_post_thumbnail_url( $post_id = NULL ) {
global $id;
$post_id = ( NULL === $post_id ) ? $id : $post_id;
$src = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), 'full');
$src = $src[0];
return $src;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment