Skip to content

Instantly share code, notes, and snippets.

@ahaywood
Last active December 10, 2015 22:58
Show Gist options
  • Save ahaywood/4505573 to your computer and use it in GitHub Desktop.
Save ahaywood/4505573 to your computer and use it in GitHub Desktop.
PHP: WP - Insert Post Thumbnail
<?php
// INSERT POST THUMBNAIL
if ( has_post_thumbnail()) { $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large'); echo $thumbnail[0]; }
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment