Here is my loop
<?php if ( have_posts() ) : $count = 0; while ( have_posts() ) : the_post(); $count++; ?>
<section class="image-with-text">
<div class="row blog-row">
<?php if(($count % 2) == 0){ ?>
<div data-aos="fade-right" class="left text aos-init aos-animate">
<h1><a href="<?php echo get_permalink(); ?>"><?php the_title(); ?></a></h1>
<?php if( get_field('sub_header') ): ?>
<h2><?php echo get_field('sub_header');?></h2>
<?php endif;?>
<?php the_tags('Tags: ', ', ', '<br />'); ?>
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<div class="addthis_inline_share_toolbox"></div>
<?php the_excerpt(); ?>
<p><span style="text-decoration: underline;"><a href="<?php echo get_permalink(); ?>">Read More...</a></span></p>
<p> </p>
</div>
<div data-aos="fade-left"
class="right background-image aos-init lazyloaded aos-animate"
style="background-position: center center;
background-image: url(<?php the_post_thumbnail_url(); ?>);"
data-bg="<?php the_post_thumbnail_url(); ?>">
</div>
<?php } else{ ?>
<div data-aos="fade-right"
class="left background-image aos-init lazyloaded aos-animate"
style="background-position: center center;
background-image: url(<?php the_post_thumbnail_url(); ?>);"
data-bg="<?php the_post_thumbnail_url(); ?>">
</div>
<div data-aos="fade-left" class="left text aos-init aos-animate">
<h1><a href="<?php echo get_permalink(); ?>"><?php the_title(); ?></a></h1>
<?php if( get_field('sub_header') ): ?>
<h2><?php echo get_field('sub_header');?></h2>
<?php endif;?>
<?php the_tags('Tags: ', ', ', '<br />'); ?>
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<div class="addthis_inline_share_toolbox"></div>
<?php the_excerpt(); ?>
<p><span style="text-decoration: underline;"><a href="<?php echo get_permalink(); ?>">Read More...</a></span></p>
<p> </p>
<!-- Link from global.js-->
<!-- <a href="https://www.pinterest.com/pin/create/button/?url=https%3A%2F%2Fwordpress-329752-1448773.cloudwaysapps.com%2Fblog%2F&media=https%3A%2F%2Fwordpress-329752-1448773.cloudwaysapps.com%2Fwp-content%2Fuploads%2F2020%2F06%2Fsustainable-fashion-bella-and-frank-1-scaled.jpg&description=%27" data-pin-do="buttonBookmark">-->
<!-- Pinit-->
<!-- </a>-->
<!-- plain link-->
<!-- <a href="https://www.pinterest.com/pin/create/button/" data-pin-do="buttonBookmark">-->
<!-- </a>-->
</div>
<?php } ?>
</div>
</section>
<section class="spacer"></section>
<?php endwhile;?>