Created
November 27, 2012 04:32
-
-
Save caratage/4152389 to your computer and use it in GitHub Desktop.
Add class to first post of loop
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
while ( have_posts() ) : the_post(); | |
if( $wp_query->current_post ==0 && !is_paged() ) { | |
$myclass = "fist-post"; | |
} | |
endwhile; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment