Home › Forums › Add-ons › Repeater Field › loop to display all subfield of a repeater › Reply To: loop to display all subfield of a repeater
A have_rows()
loop will display empty rows unless you check to see if every sub field has a value first. In a normal loop it would be something like
if (get_sub_field('field1') && get_sub_field('field2') /* && etc... */) {
// all field have content, output content
}
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.