daily pastebin goal
89%
SHARE
TWEET

Untitled

a guest May 16th, 2018 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $args = array(
  2.     'category_name' => 'Events',
  3.     'meta_query' => array(
  4.         array(
  5.             'key' => 'meta_key_to_order_by',
  6.             'value' => time(),
  7.             'compare' => '>=',
  8.             'type' => 'NUMERIC'
  9.         ),
  10.         array(
  11.             'key' => 'some other key',
  12.             'value' => 'key value',
  13.             'compare' => '='
  14.         ),
  15.     ),
  16.     'meta_key' => 'meta_key_to_order_by',
  17.     'order' => 'ASC',
  18.     'orderby' => 'meta_value'
  19.  );
  20. $events_query = new WP_Query( $args);
RAW Paste Data
Top