Below is the PHP code I used to achieve this task within a WordPress environment:
get_header('home'); ?>
<?php
$args = array( 'post_type' => 'the_teams', 'posts_per_page' => 9999);
$the_query = new WP_Query( $args );
?>
<?php if ( $the_query->have_posts() ) :
$n=0;?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post();
$n++;
if ($n == 1):?>
<div class="block-wrapper">
<?php endif;
if ($n < 3):?>
<div class="team<?php echo $n;?>">
<div class="holder">
<div class="line1"></div>
<div class="title"><?php echo the_title();?></div>
<div class="line2"></div>
</div>
<div class="image"><img src="<?php echo the_post_thumbnail_url(); ?>" /></div>
<div class="text"><?php echo get_field("short_description"); ?></div>
</div>
<?php endif;
if ($n ==2):
$n=0; ?>
</div>
<?php endif; ?>
<?php
endwhile;
endif;
?>
<?php get_footer(); ?>
To create the desired layout, I repeated the above HTML structure 4 times, with each iteration representing one of the green squares in the grid. Each set of information was enclosed in a container div with the class "block-wrapper." Once the iterations are complete, setting "display: inline-block" for block-wrapper along with appropriate margin-right styling will organize the content into columns. Here is how the final HTML would look like:
<div class="block-wrapper">
<div class="team1">
<div class="holder">
<div class="line1"></div>
<div class="title"></div>
<div class="line2"></div>
</div>
<div class="image"><img src=""></div>
<div class="text"></div>
</div>
<div class="team2">
<div class="holder">
<div class="line1"></div>
<div class="title"></div>
<div class="line2"></div>
</div>
<div class="image"><img src=""></div>
<div class="text"></div>
</div>
</div>
By following these steps and adjustments, you can successfully display the content in 4 columns on your WordPress website. Feel free to reach out if you need further assistance.