Home › Forums › Add-ons › Repeater Field › Repeater Fields Not Showing Up On Front End › Reply To: Repeater Fields Not Showing Up On Front End
You need to echo the field value, not just return it. get_sub_field()
is for returning it (i. e. to store it in a variable and do something with it afterwards), and for directly echoing it you would use the_sub_field()
(spot the little difference between “get” and “the”).
However, you can, of course, also go the little detour of storing the value in a variable and then echoing that variable; so, in your example, you would do:
$sub_value = get_sub_field(‘document_text’);
…
…
echo($sub_value);
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.