Home › Forums › General Issues › WP Shortcode from ACF repeater field? › Reply To: WP Shortcode from ACF repeater field?
Two things were wrong (three, counting the missing global $post; line) :
1) I was using the_permalink() instead of get_the_permalink(), and that was causing the output buffer.
2) I had to append each row to a final output variable. So I added this at the end of the while loop: $final_output .= $output; Then this at the end to return: return $final_output;
Thanks for your help John!
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.