title: How to sort posts in category.php without using query_posts in Wordpress
body: <p>It seems, that standard WP loop works smoothly, when I need to categorize posts. When used in category.php it displays only posts added to a certain category, for example: I have two categories, movies and music, and i have posts assigned to each of the cetgory, and also I have posts assigned to both of the categories. If so, posts assigned to both of the categories are displayed in both categories perfectly, while posts assigned to one category are displayed only on one category page. I tried to sort them by date or id, but using query_posts doesn't work. It causes to display all posts on all category pages apart form they're groupped by certain category. Is there a way to sort them in different way?</p>
  
  <p><strong>edit:</strong> </p>
  
  <p>it's the standard loop, where everything works perfectly. as I written above, while having 'movies' category page, posts assigned only to 'movies' category are displayed on that page, and it's like that with every category page. But it's sorted, I think, by date and descending.</p>
  
  <pre><code>&lt;div class="category_info"&gt;&lt;?php echo category_description(); ?&gt;&lt;/div&gt;
  &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
  &lt;div class="categorymain"&gt;
  &lt;h4 class="posttitle"&gt;&lt;?php the_title(); ?&gt;&lt;/h4&gt;
  &lt;?php echo intro_text(250); ?&gt;
  &lt;a href="&lt;?php the_permalink() ?&gt;" class="readmore"&gt;read more »&lt;/a&gt;
  &lt;/div&gt;&lt;!--end categorymain--&gt;
  &lt;?php endwhile; endif; ?&gt;
  </code></pre>
  
  <p>but, when I wrap everything with</p>
  
  <pre><code>&lt;?php query_posts('order=ASC'); ?&gt;
  //...above code here
  &lt;?php wp_reset_query();?&gt;
  </code></pre>
  
  <p>everything is ruined. On 'movies' category page posts form 'movies' category are displayed, but also posts from every other category, not related to 'movies', and this happens on every category page. I hope I made it clear :) Oh, and by the way, everything is coded in category.php.
   greets to everyone:)</p>
  
  <hr>
  
  <p>edit </p>
  
  <p>I foud a seamless solution, here it is:</p>
  
  <pre><code>&lt;?php global $wp_query;
  $args = array_merge( $wp_query-&gt;query, array( 'category__in' =&gt; array(get_query_var('cat')), 'order' =&gt; 'DESC', 'orderby' =&gt; 'title' ));
  query_posts( $args );
  ?&gt;
  </code></pre>