array( 'post' ),
'post_status' => 'publish',
'posts_per_page' => '3',
'tax_query' => array (
array (
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'activitats','actividades','agenda','agenda-es'
)
),
'meta_query' => array(
array ( //filter results older than yesterday
'key' => 'xxp_agenda_date_end',
'value' => date("Y-m-d"),
'compare' => '>=',
'type' => 'DATE',
)
),
// order by meta agenda_date_end
'orderby' => 'meta_value',
'order' => 'ASC',
)
);
?>
have_posts() ) : ?>
have_posts() ) : $agenda_query->the_post(); ?>