Preserve Original Query Arguments

Codex Function_Reference query_posts #Preserving_the_Original_Query_Pagination_etc

If you want to override the original arguments, you must merge your argument array last (reverse of what is shown in Codex):

global $wp_query;
query_posts(
   array_merge(
      $wp_query->query,
      array('cat' => 1)
   )
);

Leave a Reply

Your email address will not be published. Required fields are marked *

*