php – Filter wordpress query by numerical order arguments

Question

I have some programs that go according to the day but I want it to be filtered by custom field such as menu_order, that is, by numerical position through ordernum that I can give it

This doesn’t show me the result. ordernum is a select field with integers

$args = array(
    'post_type' => 'schedule', 
    'posts_per_page' => -1, 
    'meta_key' => 'day',
    'meta_value' => 'Sunday',
    'meta_query' => array(
          array(
              'key' => 'ordernum',
              'value' => 'meta_value_num',
              'compare' => '=',
       ),
  )
);

0
Jhon Fer 10 months 2022-08-07T18:12:54-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse