the loop printing post in one grid

I am trying to print my wordpress post into 2/2 grid but I think my div’s are messed up.

<div class=”grid-container”>
if ( has_post_thumbnail() ):
echo ‘<div class=”grid”>’

<?php the_post_thumbnail(‘medium_large’);
<h1 class=”page-sub-main-header” style=”color: #00adee;”>
<a href=”<?php the_permalink(); ?>”>
<?php the_title() ?>
<p><?php the_excerpt();?></p>
<div class=”footer-meta”>
<a href=”$query->the_permalink()”><?php the_category(); ?> </a>
<span> <?php the_date(‘d/m/Y’); ?></span>
<?php endwhile; ?>
<?php endif;
echo ‘</div>’;
</div><!–grid container–>

What am I doing wrong?

Read more here:: the loop printing post in one grid

Leave a Reply

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