Support

Account

Home Forums Add-ons Repeater Field Hide repeater block after expired date Reply To: Hide repeater block after expired date

  • 
    <?php 
      if (have_rows('daily-offer', 'option')) {
        while (have_rows('daily-offer', 'option')) {
          the_row(); 
          if (get_sub_field('date', false, false) > date('Ymd')) {
            the_sub_field('title');
            the_sub_field('date');
            the_sub_field('content');
          }
        }  
      } else {
        // no rows found 
      }
    ?>