blog posts sorting doesnt work while using get_query_var

I’m trying to show the latest posts using the get_query_var function. The function filters the posts according to their category.
When I’m displaying the posts on the page they appear unsorted although I’ve added the

$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args=array(
'category__in'=>array( $cat),
'order' => ASC,
'caller_get_posts' => 1,
'paged'=>$paged,
'orderby' => date,
);
query_posts($args);

Read More

How can I sort properly?

Related posts

Leave a Reply

1 comment

  1. If something unexpected happens between query_posts() and get_post(), it is probably a plugin that hooks into the query and modifies it. Try disabling all plugins to see whether the problem disappears. Re-enable them one by one until you see the problem, that is the plugin that causes it.