Pausing and Resuming WP_Query results

I think the best way to approach this might be to run your WP_Query just one time, but then access the stored query results three times to output each wanted set of data. This will save you from using multiple DB queries, and by using three separate loops, you can still add a parent div to each set of posts as desired. Here’s the concept I came up with:

<div id="main-content">

    <?php 
        $q = new WP_Query([
            'post_type' => 'post',
            'posts_per_page' => 6
        ]);

        $posts = $q->posts;
    ?>

    <div id="set_1" class="column" data-span="6">
    <?php
        $c = 0;
        foreach ($posts as $a_post) {
            $c++;
            if( $c==1 ) {
                echo $a_post->post_title . " - Post #$c<br>";
                break;
            }
        }
    ?>
    </div>

    <div id="set_2" class="column" data-span="3">
    <?php
        $c = 0;
        foreach ($posts as $a_post) {
            $c++;
            if( $c==2 || $c==3 ) {
                echo $a_post->post_title . " - Post #$c<br>";
            }
        }
    ?>
    </div>

    <div id="set_3" class="column" data-span="3">
    <?php
        $c = 0;
        foreach ($posts as $a_post) {
            $c++;
            if( $c==4 || $c==5 ) {
                echo $a_post->post_title . " - Post #$c<br>";
            }
        }
    ?>
    </div>

</div><!-- end #main-content -->

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş