Style first post on blog differently – WordPress Avada Theme

I’ve been trying for a while to figure out which loop actually does the trick to style the very first post on the blog page differently from the rest (image & text bigger) and how to add a different css style to it.
This is my code but it is no working…Any help would be appreciated. Thank you!
Here is the code:

$postCount = 1;
    while ( have_posts() ): the_post();
        // Set the time stamps for timeline month/year check
        $alignment_class = '';
                    if ( $blog_layout == 'medium' ||
                        $blog_layout == 'medium-alternate'
                    ) {
                        if ( $post_count == 1 ) {
                            echo '<div class="blogstyling"></div>';
                        }
                        echo '<div class="fusion-clearfix"></div>';
                    }
   $postCount++;
   }

Read more here: Style first post on blog differently – WordPress Avada Theme

Leave a Reply

Your email address will not be published. Required fields are marked *