Hi !
I’ve customized Events Manager with some custom fields to better fit my needs. Thanks to these fields I can get very specific events, and display them wherever I want.
But the problem is, if I use the WP_Query class to display these events, it displays every event ever created (past and future) and order them by post date, not by event date. What I would like to do is display only future items (from now), and order them by event date (still filtered by specific meta keys and values).
Here is the code I’m working with :
<?php
$term= get_the_ID();
$args=array(
'post_type' => 'event',
'meta_key' => 'radio_event',
'meta_value' => $term,
'posts_per_page' => 3,
'order' => 'ASC'
);
$myloop = new WP_Query($args);
if($myloop->have_posts()) : while($myloop->have_posts()) :
$myloop->the_post();
?>
<!-- Content -->
<?php endwhile; endif; ?>
<?php wp_reset_query(); ?>
Does anybody know how I could do that ? Thanks a lot 😉
http://wordpress.org/plugins/events-manager/