title: Wordpress query_posts orderby rand not working in category archive template
body: <p>I cannot get my Wordpress theme to randomise the posts I'm displaying in the category archives [I'm using it as a CMS]. The homepage randomises normally, and I am [I think] correctly altering the WP_query. Below is the exact args array:</p>
  
  <pre><code>array(4) { ["orderby"]=&gt; string(4) "rand" ["order"]=&gt; string(3) "ASC" ["posts_per_page"]=&gt; string(2) "-1" ["category_name"]=&gt; string(8) "branding" }
  </code></pre>
  
  <p>For easier reading it is:</p>
  
  <pre><code>orderby =&gt; rand
  order =&gt; ASC
  posts_per_page =&gt; -1
  category_name =&gt; branding (or whatever the query_string brings in)
  </code></pre>
  
  <p>I get all the posts from the category, but they are in post date order.</p>
  
  <p>Any clues? or alternate methods for shuffling the result of my WP_query in the have_posts?</p>
  
  <p>Thanks.</p>
  
  <pre><code>************EDIT************
  </code></pre>
  
  <p>Sorry I should have been more clear about the args array above. It is a var_dump of the query array, not my arguments I am adding to the query.</p>
  
  <pre><code>    $args = array(
          'orderby'        =&gt; 'rand',
          'order'      =&gt; 'ASC',
          'posts_per_page' =&gt; '-1',
      );
      global $wp_query;           
      remove_all_filters('posts_orderby');
      $theq = array_merge($args, $wp_query-&gt;query);
      query_posts($theq);
  </code></pre>
  
  <p>I added the remove_all_filters as per Sheikh Heera suggestion, but it hasn't made a difference.</p>