title: Conditional for wordpress WP_Query class' "orderby" or "order" arguments
body: <p>Context: using Ajax with Wordpress.</p>
  
  <p><code>functions.php</code>: </p>
  
  <pre><code>       $filterby = $_POST['filter'];
          $orderby = $_POST['order'];
          $args = array(
              'post_type' =&gt; 'projects',
              'posts_per_page' =&gt; -1,
              // 'orderby' =&gt; $orderby,
              'orderby' =&gt; array( 'title' =&gt; 'ASC', 'date' =&gt; 'DESC' ),
              // 'order' =&gt; 'ASC',
              'category_name' =&gt; $filterby,
          );
  </code></pre>
  
  <p><code>$filterby</code> regards post categories.</p>
  
  <p><code>$orderby</code> can be <code>'date'</code> or <code>'title'</code>, depending on what the users choose. </p>
  
  <p>If it is <code>'date'</code>, I want ``order' => 'DESC'. [displays latest posts first]</p>
  
  <p>If it is <code>'title'</code>, I want ``order' => 'ASC'. [displays alphabetically, from a to z]</p>
  
  <p>Thanks for taking the time.</p>