Last active
April 14, 2016 11:35
-
-
Save mattradford/e9a9cfda01e1b15191eb to your computer and use it in GitHub Desktop.
Change post class if first post
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
<?php | |
if ($wp_query->current_post == 0 && !is_paged()) : | |
$first = ( $wp_query->current_post == 0 && !is_paged() ) ? 'firstpost' : ''; post_class($first); | |
else : | |
post_class(); | |
endif; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment