Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created May 21, 2013 14: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 billerickson/5620210 to your computer and use it in GitHub Desktop.
Save billerickson/5620210 to your computer and use it in GitHub Desktop.
<?php
// Remove default image
remove_action( 'genesis_post_content', 'genesis_do_post_image' );
/**
* Teaser Image
*
*/
function be_teaser_image() {
if( in_array( 'one-third', get_post_class() ) )
echo '<p><a href="' . get_permalink() . '">' . get_the_post_thumbnail( null, 'be_grid' ) . '</a></p>';
}
add_action( 'genesis_before_post_title', 'be_teaser_image' );
/**
* Feature Image
*
*/
function be_feature_image() {
if( in_array( 'feature', get_post_class() ) )
echo '<p><a href="' . get_permalink() . '">' . get_the_post_thumbnail( null, 'be_feature' ) . '</a></p>';
}
add_action( 'genesis_after_post_title', 'be_feature_image' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment