Returning Loops wordpress

31 views Asked by At

How do i change this so after the first three posts it stops the loop and returns with the rest of the posts in a separate row

<?php
    $the_query = new WP_Query( 'posts_per_page=3' );
?>
<?php
    while ($the_query -> have_posts()) : $the_query -> the_post();
?>
    <div class="col-md-4">
        <a href="<?php the_permalink() ?>">
            <?php the_title(); ?>
        </a>
        <?php the_excerpt(__('(moreā€¦)')); ?>
    </div>
<?php
    endwhile;
    wp_reset_postdata();
?>
1

There are 1 answers

3
Johannes On BEST ANSWER

posts_per_page=3 will only return 3 posts, so you'll have to change that value to the number of posts (in your case excerpts) you want to display on that page.