I’m sure you could also do this with
pre_get_posts, but this works nicely, replacing
post_class() within the
This file contains 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
|if ($wp_query->current_post == 0 && !is_paged()) :|
|$first = ( $wp_query->current_post == 0 && !is_paged() ) ? 'firstpost' : ''; post_class($first);|
Could also be done with CSS
:first-child of course.