Last active
August 29, 2015 14:13
-
-
Save jdspiral/cfbeed52c11993f8c6e4 to your computer and use it in GitHub Desktop.
Add featured image
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
//* 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