title: Altering global post query (wordpress)
body: <p>I was wondering if there is a way to alter the global wordpress posts query.</p>
  
  <p>Let's say that I'm in a tags archive. I need to be able to change the order and posts_per_page variables</p>
  
  <p>when I use this:</p>
  
  <pre><code>global $wp_query;
  $wp_query-&gt;set('order', 'ASC');
  </code></pre>
  
  <p>It changes the variable, but the posts order is not changed.</p>
  
  <p>Creating another query would do the job, but doing so would require me to use different queries for tags, archives, search results and etc, which is not an option for me.</p>
  
  <p>I hope you understand what it is that I need.</p>
  
  <p>Any ideas on how to solve this? </p>
  
  <p>Thank you!</p>