wp query – I want to capture the last day’s (today) posts in a category in the numbered order in acf

Question

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();
        ?>

0
Smia Lo 2 months 2022-10-04T09:27:55-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse