Skip to content

Instantly share code, notes, and snippets.

@jamiemitchell
Created October 21, 2013 07:49
Show Gist options
  • Save jamiemitchell/7080078 to your computer and use it in GitHub Desktop.
Save jamiemitchell/7080078 to your computer and use it in GitHub Desktop.
Add the featured image before post title in Genesis
<?php
/* Add the featured image before post title
------------------------------------------------------------ */
add_action( 'genesis_entry_header', 'jm_portfolio_grid',5 );
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