I created an ACF repeater field on my options page but I'm unable to retrieve the value using get_field()
. How do I retrieve the repeater value?
According to ACF - Get values from an options page, you need to add 'option'
as the second parameter in get_field()
.
See this example:
$variable = get_field('field_name', 'option');