Skip to content

Instantly share code, notes, and snippets.

@jdspiral
Last active August 29, 2015 14:13
Show Gist options
  • Save jdspiral/cfbeed52c11993f8c6e4 to your computer and use it in GitHub Desktop.
Save jdspiral/cfbeed52c11993f8c6e4 to your computer and use it in GitHub Desktop.
Add featured image
//* Add featured image
add_action ( 'genesis_entry_header', 'jds_featured_image', 15);
function jds_featured_image() {
if ( is_single() )
return;
if ($image = genesis_get_image('format=url&size=thumbnail')) {
echo '<div class="alignleft">';
printf('<a href="%s"><img class="alignleft" src="%s" alt="%s" /></a>', get_permalink(), $image, the_title_attribute('echo=0'));
echo '</div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment