I have 50 items that have to be sorted using custom categories (15 of those). I’m using ACF and CPT UI for this. My custom post type name is “cars” and custom taxonomy is “car_category”. Many of the items will have multiple categories. When I started adding those multiple categories to actual items they became completely mixed up. I know I’m missing something but I can’t find my mistake.

Here’s my code from taxonomy-car_category.php:


  $posts = get_posts(array(
  'posts_per_page'  => -1,
  'post_type'           => 'cars'

  if( $posts ): ?>

    <?php while ( have_posts() ) : the_post(); ?>

      <a href="<?php the_permalink(); ?>">
        <?php echo the_post_thumbnail(''); ?>

    <?php endwhile; ?>

  <?php endif; ?>

Read more here: Multiple Categories Loop (Taxonomy) – ACF


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: