jcadima
11/30/2018 - 9:48 PM

Get value from repeater inside a group

ACF layout:

speaker_group : group
	date : text
	time : text

	speaker_outlines_pdfs : repeater
		outline_title : text
		outline_file : file



$speaker_group = get_field('speaker_group') ;


<?php if( $speaker_group ) : ?>
	<table class="table table_border">
		<tbody class="table_padd">
		<tr>
			<td class="col_subs">Date:</td>
			<td><?php echo $speaker_group['date'] ; ?></td>
		</tr>
		<tr>
			<td class="col_subs">Time:</td>
			<td><?php echo $speaker_group['time'] ; ?></td>
		</tr>	
		
		<tr>
			<td class="col_subs">Speaker's Outlines:</td>
			
			<td>						
				<?php
				//  Repeater
				if( $speaker_group['speaker_outlines_pdfs'] ) : 

					foreach ($speaker_group['speaker_outlines_pdfs']  as $outline )  : ?>
															   											
						<div>
							<a target="_blank" href="<?php echo $outline['outline_file'] ?>">
								<?php echo $outline['outline_title'] ?>
							</a>
						</div>
					<?php endforeach ; ?>
															
				   <?php  
					   else :
				    echo '&nbsp;' ; ?>
				
				<?php endif; ?>																				
			
			</td>
		</tr>								
		
		
		
		</tbody>
	</table>
<?php endif; ?>