Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created April 29, 2014 13:15
Show Gist options
  • Select an option

  • Save billerickson/11399989 to your computer and use it in GitHub Desktop.

Select an option

Save billerickson/11399989 to your computer and use it in GitHub Desktop.
<?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