Tag Info

New answers tagged


your are comparing time against wrong time string: change: 'meta-value' => date('Y-m-d', strtotime('-6 hours')), //value of "order-date" to this 'value' => date('m-d-Y', strtotime('-6 hours')), //value of "order-date" because your time string is in m-d-Y format and you are check against Y-m-d which is wrong. NOTE if above trick doesn't work ...


You need type casting for custom fields event-start-date and event-end-date. Then it will compare with time() & date() value. You need to add 'type' => 'DATE', in your meta query args. So your meta query will be like this: switch ($print_type) { case 'current': $meta_quer_args = array( 'relation' => 'AND', ...

Top 50 recent answers are included