how could i get for every post on a page a post_class "first"?
with this code a managed a class "first_post" for the really first post of the loop, but i need it also on the second, third and so on page of the loop.
function.php
function firstpost_class($class) {
global $post, $posts;
if ( is_home() && !is_paged() && ($post == $posts[0]) ) $class[] = 'firstpost';
return $class;
}
add_filter('post_class', 'firstpost_class');
Thanks for your help. Google couldn't help yet.