Display excerpt and read more button in separate columns

Question

I’m trying to loop through and display the post similar to the design in the attached image.
Date, Title and Excerpt in one column to the left and the read more button in the other column to the right.

I tried to do this but it does not work. It just adds and extra Read More button under the Read More button that is automatically added for the excerpt.

How can I create this layout?

    <?php
    $args = array(
        'post_type' => 'post'
    );

    $post_query = new WP_Query($args);

    if($post_query->have_posts() ) {
        while($post_query->have_posts() ) {
              $post_query->the_post(); 
            ?> 
<?php the_date(); ?>
 <h2><?php the_title(); ?></h2>
 <?php the_excerpt(); ?> 
 <div style="float:left">
<a href="<?php the_permalink(); ?>">Read More</a>
</div>
            <?php
            }
        }
?>

enter image description here

0
, BruceAliroy 2 years 2020-08-30T01:10:18-05:00 0 Answers 49 views 0

Leave an answer

Browse
Browse