Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srikat/72bc46d97611b3197eda to your computer and use it in GitHub Desktop.
Save srikat/72bc46d97611b3197eda to your computer and use it in GitHub Desktop.
Featured images, Attached images and Embedded images. https://sridharkatakam.com/featured-images-attached-images-and-embedded-images/
if ( $image = genesis_get_image( 'format=url&size=posts-page-thumbnail' ) ) {
printf( '<div class="posts-page-thumbnail"><a href="%s" rel="bookmark"><img src="%s" alt="%s" /></a></div>', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
}
get_the_image( array( 'size' => 'posts-page-thumbnail', 'scan' => true ) );
// Register a custom image size for images on the Posts page
add_image_size( 'posts-page-thumbnail', 600, 400, true );
<img src="http://genesis-blank.dev/wp-content/uploads/2013/06/wordpress.png" alt="Heres a sample caption, with a sample image aligned left." width="142" height="142" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment