Skip to content

Instantly share code, notes, and snippets.

@rbk
Created June 10, 2013 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbk/5750784 to your computer and use it in GitHub Desktop.
Save rbk/5750784 to your computer and use it in GitHub Desktop.
get events
$events = new WP_Query(
array(
'post_type'=>'guru_events',
'orderby' => 'meta_value',
'meta_key' => 'the_event_date',
'order' => 'ASC'
)
);
while ( $events->have_posts() ) : $events->the_post();
// do stuff
endwhile;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment