I am trying to display wordpress posts in ascending instead of descending order.
The code I am using in my template is below
<?php
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query();
$wp_query->query('showposts=24&post_type=movie&orderby=ASC' . '&paged=' . $paged);
while ($wp_query->have_posts()) : $wp_query->the_post();
?>
however this is not working.
Does anyone know why?
Any help would be great
D
It’s ok but,
The difference is: “order”, not “orderby”.
Try this. There was just a small mistake that you were trying to order by which is not used with wp_query.