Last active
August 29, 2015 14:24
-
-
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' ) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_the_image( array( 'size' => 'posts-page-thumbnail', 'scan' => true ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Register a custom image size for images on the Posts page | |
add_image_size( 'posts-page-thumbnail', 600, 400, true ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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