How to use wp_query in different columns in single loop?

wordpress Loop display

I want use one wordpress loop display posts in a row as:

<div class="row">
    <div class="col-12 col-md-6">
        post 1
    </div>
    <div class="col-12 col-md-6">
        <div class="row">
            <div class="col-12 col-md-6">
                post 2
            </div>
            <div class="col-12 col-md-6">
                post 3
            </div>
            <div class="col-12 col-md-6">
                post 4
            </div>
            <div class="col-12 col-md-6">
                post 5
            </div>
        </div>
    </div>
</div>

I don’t know how loop post 2 - 5

Can you help solve that don’t use plugins?

Read more here:: How to use wp_query in different columns in single loop?

Leave a Reply

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