I'm trying to get my posts from my category.php file.
The loop works fine, it's showing my custom post types, but I'd like to store the posts from my category to reorder them in a certain way.
How do I do that ? Tried to use get_posts()
, the it return the 3 first post of the 'post' post type.
<?php
if (have_posts()) : ?>
<section class="playlist_row row">
<div class="col-12 owl-container" id="<?= "";?>">
<div class="owl-carousel owl-theme">
<?php
while (have_posts()) : the_post(); ?>
<?php get_template_part("template-parts/card/playlist", "card"); ?>
<?php endwhile; ?>
</div>
</div>
</section>
<?php
else: ?>
<p>Aucun résultat.</p>
<?php endif; ?>