• Resolved ccawcutt

    (@ccawcutt)


    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)
  • Plugin Author Abhishek

    (@abhisheksatre)

    Hi @ccawcutt,

    1. Please make sure the pro version plugin is active and deactivate the free plugin.
    2. Please check the output of the $repeater variable.
    3. The above code seems correct to me.

    Plugin Author Abhishek

    (@abhisheksatre)

    Closing the thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Repeater Fields not working’ is closed to new replies.