I have a Repeater Field Group on an Options Page called “Address Book”. I would like to display the Phone Number (text field), of my first entry, in the WordPress Header.php.
I can’t find any documentation on how to do this.
I found something like this in the support forums but it’s not working.
<?php
$rows = get_field(‘location’, ‘option’); // get all the rows
$first_row = $rows[0]; // get the first row
$first_row_phone = $first_row[‘location_phone’ ]; // get the sub field value
?>
<?php echo $first_row_phone[0]; ?>