title: Order by Post date and meta value - wordpress
body: <p>I'm trying to order my WordPress posts by 3 different columns in 2 different tables. </p>
  
  <p>The first is post_date, it's located in wpdb->posts table.</p>
  
  <p>The second is the post's meta key and meta value, located in wpdb->postmeta.</p>
  
  <pre><code>meta_key = et_payment_package
  meta_value = 1 or 0
  </code></pre>
  
  <p>The two columns are in different tables. How do I go about ordering them? I would like to display posts with et_payment_package=1 by their original post dates as the first few posts, followed by every other post with et_payment_package=0.</p>