Order custom post type is beign ignored


I have a custom post type "car". I’ve created a loop to show all the titles of that post type. I want to show them alphabetically. But the order is ignored.

$loop = new WP_Query( array(
    'post_type' => 'car',
    'orderby' => 'title',
    'order' => 'DESC'
while ( $loop->have_posts() ) : $loop->the_post();


endwhile; wp_reset_query(); 

The order output is the same order of the input. So I’ve added Volkswagen Tiguan first, so that is shown first and not Audi A1 (for example).

Dennis 2 months 0 Answers 18 views 0

Leave an answer