Category template shows posts from all categories when sort ascending
I made a page called category-1.php. It works the way it should (i.e. shows only posts from category 1) except when I instert this code:
<?php $wp_query = new WP_Query(‘order=ASC’); ?>
before The Loop. I am using this code because I want to display the posts in ascending order by date. The problem is that when I use this code, in addition to showing posts in ascending order, it also shows all the posts from all the other categories.
- The topic ‘Category template shows posts from all categories when sort ascending’ is closed to new replies.