$sticky,
'post_status' => 'publish',
'posts_per_page' => 10,
'no_found_rows' => true
);
// The Featured Posts query.
$featured = new WP_Query( $featured_args );
// Proceed only if published posts exist
if ( $featured->have_posts() ) :
/**
* We will need to count featured posts starting from zero
* to create the slider navigation.
*/
$counter_slider = 0;
?>
have_posts() ) : $featured->the_post();
if ( has_post_thumbnail() ) {
// Now let's check the image.
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'triton-lite-950-cropped' );
// If it is smaller than 950 in width, let's skip
if ( $image[1] < 950 )
continue;
// Increase the counter.
$counter_slider++;
}
else {
continue;
}
?>
post_count > 1 ) :
?>
have_posts() ) : $featured->the_post();
if ( has_post_thumbnail() ) {
// Now let's check the image.
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'triton-lite-950-cropped' );
// If it is smaller than 950 in width, let's skip
if ( $image[1] < 950 )
continue;
// Increase the counter.
$counter_slider++;
}
else {
continue;
}
if ( 1 == $counter_slider )
$class = 'class="active"';
else
$class = '';
?>
- >