1, 'post__in' => $sticky, ); $featured = new WP_Query(); $featured->query( $featured_args ); // Let's roll. if ( $sticky ) : $featured->the_post(); // We're going to add a class to our featured post for featured images // by default it'll have no class though $feature_class = ''; if ( has_post_thumbnail() ) { // … but if it has a featured image let's add some class $feature_class = 'feature-image small'; // Hang on. Let's check this here image out. $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ); // Is it bigger than or equal to our header? if ( $image[1] >= HEADER_IMAGE_WIDTH ) { // Let's add a BIGGER class. It's EXTRA classy now. $feature_class = 'feature-image large'; } } ?>

= HEADER_IMAGE_WIDTH ) { ?>

'DESC', 'post__not_in' => get_option( 'sticky_posts' ), 'tax_query' => array( array( 'taxonomy' => 'post_format', 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-quote', 'post-format-status' ), 'field' => 'slug', 'operator' => 'NOT IN', ), ), ); $recent = new WP_Query(); $recent->query( $recent_args ); $counter = 0; while ( $recent->have_posts() ) : $recent->the_post(); // set $more to 0 in order to only get the first part of the post global $more; $more = 0; $counter++; if ( 1 == $counter ) : get_template_part( 'content', get_post_format() ); echo '
    '; else : ?>
  1. Leave a reply', 'twentyeleven' ), __( '1 Reply', 'twentyeleven' ), __( '% Replies', 'twentyeleven' ) ); ?>