Category template shows posts from all categories when sort ascending (2 posts)

  1. chamster
    Posted 8 years ago #

    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.

    Any ideas?

    Thanks much.

  2. moshu
    Posted 8 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.