Home Forums General Issues Sorting using ACF Date field Reply To: Sorting using ACF Date field

  • Can i find a update of this code ? I have try, But not working.

    I use now this code:

    function dd_query_by_event_date( $query ) {
    $query->set( ‘orderby’, ‘meta_value’ );
    $query->set( ‘meta_key’, ‘start_date’ );
    $query->set( ‘meta_query’, array(
    ‘key’ => ‘start_date’,
    ‘value’ => date( ‘Y-m-d’ ),
    ‘compare’ => ‘>=’,
    ‘type’ => ‘DATETIME’,
    ) );
    add_action( ‘elementor/query/dd_event_date’, ‘dd_query_by_event_date’ );

    But with this code you have the problem as described above, the problem that it no longer displays everything from the start date