As @MridulAggarwal already stated, it's a pretty basic PHP task that you're confronted with:
$wpse69584_posts = get_posts( array( /* Your Arguments */ ) );
echo $post[0]['post_title'];
echo isset( $post[0]->post_excerpt )
? apply_filters( 'the_excerpt', $post[0]->post_excerpt )
: apply_filters( 'the_content', $post[0]->post_content )
;
// etc.
Or if you're using a loop, it's even easier:
global $wpdb;
if ( have_posts() )
{
while( have_posts() )
{
the_post();
if ( 1 <= $wpdb->current_post )
{
$thumb_size = 'BIG';
}
// Add 'MEDIUM' to 2nd post and 'SMALL' to each other
else
{
$thumb_size = ( 2 == $wpdb->current_post ? 'MEDIUM' : 'SMALL' );
}
echo '<article '.get_post_class( "post-number-{$wpdb->current_post}" ).'>';
echo "<h{$wpdb->current_post}>";
the_title();
echo "</h{$wpdb->current_post}>";
the_content();
the_post_thumbnail( get_the_ID(), $thumb_size );
echo '</article>';
}
}
Note, that this won't work with a larger number as 6
, as $wpdb->current_post
will still increment, but there's simply no <h7>
and following ;)
$posts = get_posts(); echo $posts[0]['post_title']; echo $posts[1]['post_title']; echo $posts[2]['post_title'];