I have a custom loop (used in a shortcode) that lists items from custom post type.
Everything works fine but "order" for posts doesn't work, no matter what I type as order attribute on post page - items are always displayed the same way (the most recent first and the oldest last).
Why doesn't "order" work in my case?
The loop looks like:
$loop = new WP_Query( array( 'post_type' => 'images', 'paged' => get_query_var('paged') ? get_query_var('paged') : 1, 'posts_per_page' => $per_page, ) ); while ( $loop->have_posts() ) : $loop->the_post(); (my code) php endwhile;