Site icon Hip-Hop Website Design and Development

Shops class posts in an array

I am attempting to get my posts from my class.php file.

The loop works superb, it is exhibiting my customized put up varieties, however I would prefer to retailer the posts from my class to reorder them in a sure means.

How do I try this ? Tried to make use of get_posts(), the it return the three first put up of the ‘put up’ put up sort.

    <?php
    if (have_posts()) : ?>
        <part class="playlist_row row">
            <div class="col-12 owl-container" id="<?= "";?>">
                <div class="owl-carousel owl-theme">
                <?php
                whereas (have_posts()) : the_post(); ?>
                        <?php get_template_part("template-parts/card/playlist", "card"); ?>
                <?php endwhile; ?>
                </div>
            </div>
        </part>
    <?php
    else: ?>
        <p>Aucun résultat.</p>


    <?php endif; ?>