Home › Forums › Add-ons › Repeater Field › How to hide an empty row working with Custom Field Repeater? › Reply To: How to hide an empty row working with Custom Field Repeater?
You have some issues with the nesting of your code and I could not figure out the problems so that I can edit it. This is basically what you need to do.
while (have_rows('repeater_field')) {
the_row();
// check all sub fields and only display if there are values
if (get_sub_field('sub_field_1') && get_sub_field('sub_field_1')) {
// only do this if all sub fields have 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.