I am trying to style my WordPress Posts into 2 wide and 2 rows.
I created Frankenstein!
How can I get this to be like this image.
PHP/HTML
<ul class="svcta_listing_related_posts_ul">
<li class="svcta_listing_related_posts_li">
<?php foreach( $posts as $post): ?>
<?php setup_postdata($post); ?>
<?php the_post_thumbnail('listing_post_thumbnail'); ?>
<div class="svcta_listing_related_posts_link"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
</li>
<?php endforeach; ?>
</ul>
CSS
.svcta_listing_related_posts_ul {
list-style: none;
margin: 0px;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
}
.svcta_listing_related_posts_li {
margin-right: 75px;
}


you can do this using css grid. check code snippet below
below highlighted part should be wrap in li