Last active
August 16, 2022 01:11
-
-
Save mikeott/cf78113bfb69bdd99166ca3939fa455e to your computer and use it in GitHub Desktop.
ACF return a specific repeater field row value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$cast_members = get_field( 'cast_members'); /* The repeater field */ | |
$row = $row[2]; /* The repeater field row number to target (start counting at 0) */ | |
$character = $row['character']; /* The field to get */ | |
echo $character; /* Echo the field */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Taking these fields as an example,
$character
would return Howard Hamlin.