Skip to content

Instantly share code, notes, and snippets.

@reasonstousegenesis
Created May 14, 2015 12:41
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 reasonstousegenesis/14399e54aa616bfc1e1e to your computer and use it in GitHub Desktop.
Save reasonstousegenesis/14399e54aa616bfc1e1e to your computer and use it in GitHub Desktop.
Output the featured image with Genesis
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Output the featured image with Genesis
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/featured-image/
*/
add_action( 'genesis_entry_content', 'rtug_featured_image' );
function rtug_featured_image() {
$image = genesis_get_image();
if ( $image ) {
printf( '<a href="%s" rel="bookmark">%s</a>', get_permalink(), $image );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment