Created
October 21, 2013 07:44
-
-
Save jamiemitchell/7080026 to your computer and use it in GitHub Desktop.
Add the featured image after post title in Genesis
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
<?php | |
/* Add the featured image after post title | |
------------------------------------------------------------ */ | |
add_action( 'genesis_entry_content', 'jm_portfolio_grid' ); | |
function jm_portfolio_grid() { | |
if ( $image = genesis_get_image( 'format=url&size=portfolio' ) ) { | |
printf( '<div class="portfolio-image"><a href="%s" rel="bookmark"><img src="%s" alt="%s" /></a></div>', get_permalink(), $image, the_title_attribute( 'echo=0' ) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment