Support

Account

Home Forums Add-ons Options Page IDXpress Listings Pages Not Showing Fields Reply To: IDXpress Listings Pages Not Showing Fields

  • I looked at the plugin and I don’t see anything with the quick look that sticks out as being a problem. You might want to report this as a problem for that plugin. This type of thing has come up in the past.

    In the mean time, you can fix this by testing to see if the value returned by get_field('repeater_field_name') is a number of an array. If it is a number you can loop through the rows of a repeater manually to get the array and then use that array to show the content instead of using the have_rows() repeater.

    
    // how to loop a repeater field (options) to get values with get_option()
    $repeater = 'repeater_name';
    $subfields = array('field_name_1', 'fiel_name_2', 'etc...');
    $count = intval(get_option('options_'.$repeater));
    $value = array();
    for ($i=0; $i<$count; $i++) {
      $value[$i] = array();
      foreach ($subfields as $field) {
        $field_value = get_option('options_'.$repeater.'_'.$i.'_'.$field);
        // you may need to do additional formatting on the value here
        // since this gets value stored in the database
        // and is not formatted by ACF
        $value[$i][$field] = $field_value;
      }
    }