Support

Account

Home Forums Add-ons Repeater Field Repeater fields reverse order Reply To: Repeater fields reverse order

  • What you need to do is know how many rows are in the repeater and loop through it without doing anything until you get to the last one.

    
    if (have_rows('dizi_sezon_1')) {
      // use get_post_meta
      // it will return the number of rows in the repeater
      $row_count = intval(get_post_meta($post->ID, 'dizi_sezon_1', true));
      $i = 0;
      while (have_rows('dizi_sezon_1')) {
        $i++;
        if ($i<$row_count) {
          continue;
        }
        // will only get here on the last row
        // put code here to display row
      }
    }