How to hide a section when a Looper Provider doesn't have a result from ACF Repeater field

I have a section titled “Questions - Accordion” in Cornerstone, which contains a looper that is getting it’s information from an ACF repeater field (accordion_items). Within the accordion_items group, I have a field titled “title” and “content”. The looper is creating an accordion item for each repeating field.

The looper provider is on the row. {{dc:acf:post_field field=“accordion_items”}}
The looper consumer is on the accordion item

I have tried placing the following conditions on the section “Questions Accordion” and it doesn’t hide it when there are no results:
{{dc:looper:item}} > 0
{{dc:query:found_posts}} > 0
{{dc:acf:post_field field=“accordion_items”}} is not
{{dc:acf:post_field field=“accordion_items_content”}} is not
{{dc:looper:field key=“title”}} is not
{{dc:looper:field key=“field_69971ba174dfe”}} is not

Can you please provide some guidance and/or help me figure out what I am failing to do? I would greatly appreciate it.

I did place the condition {{dc:looper:count}} > 0 on the row that has the looper provider and that hides it, but I am curious if there is a way to hide the section (that is outside of the looper provider).

Screenshot 2026-04-01 at 12.40.28 PM

Hey @dtsui,

You will have to move the Looper Provider to the Section element and then use the “Looper Provider IS NOT Empty” condition so that the section will only display when there are questions returned by the looper.

Kindly let us know how it goes.

@ruenel,

I apologize for the late reply, but I wanted to thank you for your time, insight and help. I greatly appreciate it. Now I have some options.

I also discovered that I could use {{dc:looper:count}} > 0 as well to make a section disappear if the looper provider didn’t have any content.

Thanks again and have a great day!

You are most welcome, @dtsui

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.