Created
April 29, 2014 13:15
-
-
Save billerickson/11399989 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| /** | |
| * Large Image for First Post | |
| * | |
| */ | |
| function be_blog_large_first_image( $image_size ) { | |
| global $wp_query; | |
| if( 0 == $wp_query->current_post && ! get_query_var( 'paged') ) | |
| $image_size = 'large'; | |
| return $image_size; | |
| } | |
| add_filter( 'genesis_pre_get_option_image_size', 'be_blog_large_first_image' ); | |
| /** | |
| * First Post Class | |
| * | |
| */ | |
| function be_first_post_class( $classes ) { | |
| global $wp_query; | |
| if( 0 == $wp_query->current_post && ! get_query_var( 'paged' ) ) | |
| $classes[] = 'first-post'; | |
| return $classes; | |
| } | |
| add_filter( 'post_class', 'be_first_post_class' ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment