title: When is $wp_query initialized and how to override it?
body: <p>I am trying to write a new query function using <code>WP_Query</code> object. </p>
  
  <p>I created a new template file and put the followings:</p>
  
  <pre><code>        $query_args = array(
              'post_type' =&gt; 'page',
              'post_parent=41',
          );
  
          // The Featured Posts query.
          $results = new WP_Query($query_args);
  </code></pre>
  
  <p>But whatever arguments I use, the query does not change. It looks as if the query is already initialized and creating a new <code>WP_Query</code> does not have any effect on the existing query. </p>
  
  <p>The only wordpress function called before my code is <code>get_header()</code> which does not include any call to <code>WP_Query</code> or <code>query_posts</code>.</p>
  
  <p>I put the following line to find out what the actual sql query is:</p>
  
  <pre><code>echo $GLOBALS['wp_query']-&gt;request;
  </code></pre>
  
  <p>The actual sql query is:</p>
  
  <pre><code>SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND (wp_posts.ID = '14') AND wp_posts.post_type = 'page' ORDER BY wp_posts.post_date DESC
  </code></pre>
  
  <p>This query does not change when I change my <code>$query_args</code>.</p>
  
  <p>I wonder when the global variable <code>$wp_query</code> is initialized and what should I do to use my own query?</p>