Repeater Fields not working
-
I have the pro version, however, it won’t display the information from the repeater fields. Is there a special way to call this from the php template file? Current code below which worked perfectly before.
<?php // get repeater field data $repeater = get_field('top_vendor_results'); // vars $order = array(); // populate order foreach( $repeater as $i => $row ) { $order[ $i ] = $row['vendor_aggregate']; } // multisort array_multisort( $order, SORT_DESC, $repeater ); // loop through repeater if( $repeater ): ?> <table id="topresults" class="topresults"> <tr class="row-1"> <td class="column-1">Vendor Name</td> <td class="column-2">Aggregate</td> <td class="column-3">No of Lots</td> <td class="column-4">Average</td> </tr> <?php foreach( $repeater as $i => $row ): ?> <tr class="repeater"> <td><?php echo $row['vendor_name']; ?></td> <td><?php echo $row['vendor_aggregate']; ?></td> <td><?php echo $row['vendor_lots']; ?></td> <td><?php echo $row['vendor_average']; ?></td> <?php endforeach; ?> </table> <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Repeater Fields not working’ is closed to new replies.