Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created July 24, 2012 21:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/3172761 to your computer and use it in GitHub Desktop.
Save billerickson/3172761 to your computer and use it in GitHub Desktop.
<?php
/**
* Teaser Thumbnail
* Overrides the thumbnail option set in Genesis > Theme Settings
* if on a teaser post
*
* @param string $opt
* @return string
*/
function be_teaser_thumbnail( $opt ) {
if( in_array( 'one-half', get_post_class() ) )
$opt = 'be_teaser';
return $opt;
}
add_filter( 'genesis_pre_get_option_image_size', 'be_teaser_thumbnail' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment