Support

Account

Home Forums Front-end Issues Order Query by Date Picker Reply To: Order Query by Date Picker

  • I got it sorted and wanted to post the solution

    $meta_query = array(
    			array(
    				
    				'key' => 'event_end_date',
    				'value' => date('Ymd'),
    				'type' => 'DATE',
    				'compare' => '>='
    				)
    			
    		);			
                $args = array(
                    'post_type' => 'events',
    				'orderby' => 'meta_value_num',
    				'meta_key' => 'event_start_date',
    				'order'	=> 'ASC',
                    'posts_per_page' => '115',
    				'meta_query' => $meta_query
                );