Skip to content

Instantly share code, notes, and snippets.

@braddalton
Created December 28, 2013 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/697c5a3b8adbae2b6c04 to your computer and use it in GitHub Desktop.
Save braddalton/697c5a3b8adbae2b6c04 to your computer and use it in GitHub Desktop.
/** Add new image sizes */
add_image_size( 'featured-image', 700, 350, TRUE );
add_action( 'genesis_entry_header', 'single_post_featured_image', 15 );
function single_post_featured_image() {
if ( ! is_singular( 'post' ) )
return;
$img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'featured-image' ) ) );
printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img );
}
.featured-image {
width: 700px;
height: 350px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment