Created
December 16, 2014 15:51
-
-
Save leepettijohn/709680023cf62ee3b74e to your computer and use it in GitHub Desktop.
Add Featured Image to the left of the article
This file contains hidden or 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_action ('genesis_before_entry','add_image_before_title'); | |
add_action ('genesis_before_post_title','add_image_before_title'); | |
function add_image_before_title(){ | |
if (is_category() && has_post_thumbnail()){ | |
//* Add featured image and link | |
$image = genesis_get_image( array( | |
'format' => 'html', | |
'size' => 'thumbnail', | |
'attr' => array('class'=>'alignleft') | |
) ); | |
printf( '<a href="%s" title="%s" >%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $image ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment