Support

Account

Home Forums Add-ons Repeater Field Sort by date in repeater field Reply To: Sort by date in repeater field

  • ok thanks so would you mean this code should show
    only EVENT where month=current month ?
    thnaks

    $today = date("d/m/Y");
    
    $themonth=substr($today, 3,2);
     
    $args = array (
        'post_type'       => 'EVENT',
         'meta_key'        => 'dates_%_date_EVENT',
        'meta_value'      => '[0-9]{4}' . $themonth . '[0-9]{2}',
        'meta_compare'    => 'REGEXP',
    );