Created
May 21, 2013 14:28
-
-
Save billerickson/5620210 to your computer and use it in GitHub Desktop.
This file contains 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 | |
// 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