Skip to content

Instantly share code, notes, and snippets.

@caratage
Created November 27, 2012 04:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caratage/4152389 to your computer and use it in GitHub Desktop.
Save caratage/4152389 to your computer and use it in GitHub Desktop.
Add class to first post of loop
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