-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I'm trying to get posts with this query:
$all_events = new WP_Query( array(
'network' => true,
'post_type' => 'events',
'post_status' => 'publish',
'meta_key' => 'date_debut',
'orderby' => 'meta_value',
'order' => $order,
'posts_per_page' => $posts_per_page,
'meta_query' => array(
array(
'key' => 'date_debut',
'value' => date('Ymd'),
'compare' => $compare == '<' ? '<' : $compare,
'type' => 'DATE',
),
)));
$output = '';
if ( $all_events->have_posts() ) {
$output .= '<div class="events-list '.$el_class.'">';
while ( $all_events->have_posts() ) : $all_events->the_post();
ob_start();
get_template_part('components/modules/event');
$output .= ob_get_clean();
endwhile;
$output .= '</div>';
}
return $output;
wp_reset_postdata();
Do you see anything wrong or a mistake using your plugin ?
// EDIT
It seems that it doesn't accept variables as arguments. But I did not get anything from the sites except the main. However I have the same events CPT and some published posts.
Metadata
Metadata
Assignees
Labels
No labels