wp query – I want to capture the last day’s (today) posts in a category in the numbered order in acf
I want to capture the last day’s (today) posts in a category in the numbered order in acf. I am using the code below. can sort by category. but it doesn’t just bring up today’s posts but all posts. where am i doing wrong?
<?php $today = date('Ymd'); $args = array( 'cat' => array(4,), 'posts_per_page' => '30', 'date' => 'Today', 'post_type' => 'post', 'post_status' => 'publish', 'orderby' => 'meta_value_num', 'order' => 'asc', 'meta_key' => 'acf_sira', 'paged' => $paged, 'post__not_in' => $exclude_array ); $query = new WP_Query($args); while($query->have_posts()) : $query->the_post(); ?>