title: how to order by date in WP_Query ?
body: <p>I have tried this way but <strong>orderby</strong> and <strong>order</strong> not working on WP_Query class</p>
  
  <pre><code>$posts = new WP_Query(
  array(
      'post_type'=&gt; 'block_code', 
      'orderby'=&gt; 'post_date', 
      'order' =&gt; 'DESC'
      )
  );
  </code></pre>
  
  <p>always it return <strong>orderby=> 'menu_order'</strong> and <strong>order='ASC'</strong>.</p>
  
  <p>Note: if i use param in url as <strong>orderby=date&amp;order=ASC</strong> then it works fine But i need as argument of WP_Query.</p>
  
  <p>Thanks in advance</p>