WordPress WP_Query meta_key date greater than today

Here is displaying the post with WP_Query meta_key date greater than today

$today = date(‘Ymd’);
$args = array(
‘numberposts’ => -1,
‘posts_per_page’ => 1,
‘meta_key’ => ‘game_time’,
‘meta_value’ => $today,
‘meta_compare’ => ‘<' ); // query $the_query = new WP_Query( $args );

Leave a Reply

Your email address will not be published. Required fields are marked *