lpat-post-query
// WP_Query arguments
$args = array(
'name' => 'events',
'post_status' => array( 'publish' ),
'nopaging' => true,
'posts_per_page' => '6',
'posts_per_archive_page' => '6',
'ignore_sticky_posts' => false,
'order' => 'ASC',
'orderby' => 'id',
'meta_query' => array(
array(
'key' => 'event_date',
'type' => 'DATETIME',
),
array(
'key' => 'event_start_time',
'type' => 'DATETIME',
),
array(
'key' => 'artist_name',
'type' => 'CHAR',
),
array(
'key' => 'ticketspice_link',
'type' => 'CHAR',
),
),
);
// The Query
$lpat-event-query = new WP_Query( $args );
// The Loop
if ( $lpat-event-query->have_posts() ) {
while ( $lpat-event-query->have_posts() ) {
$lpat-event-query->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();