Hide column if dynamic loopers are empty

Hi there,

I’ve set up a column that has 3 loopers in that pull from ACF repeaters. The loopers hide if they are empty which is working fine.
I want to hide the whole column if all loopers are empty but I can’t figure that out!

Hi @RubberDuckers,

Thanks for reaching out.
I have checked your website and the specified layout but didn’t recognize the problem you are having. If you want to check the multiple conditions, you can use the AND option and add all the possible checks one by one.

Please remember that the width of the Left Hand side column can’t be increased if the Right Hand column is not visible. I would suggest you use two different Row with the condition and add the full width one column and the two column based on the condition.

Hope it helps.
Thanks

Hi - thanks, I tried that - setting the three looper as ‘is not empty’ with the ‘and’ for them. But no luck, that just hides them all the time - give it a go.

Hi @RubberDuckers,

The ACF fields are repeater fields and it has been implemented as Dynamic Content, it should be checked by Provider Output => is not empty. The Provider condition can only be applied where it is implemented, so it can’t be accessible from Column or Row while implementing it in the DIV inside the column.

Hope it helps.
Thanks

So the provider output is working for the 3 individual divs as they have the dynamic content applied - is there no way of doing a check against those for the parent container then (be it a column/row/whatever)?

Or is there another/better way of pulling through the repeater fields so that they can be checked against for the parent container?

Hey @RubberDuckers,

Sorry for the delay. I had a problem with my test site but now it’s fixed.

Based on my test, you can do it like the following screenshot where a container is the Repeater Looper Provider and at the same time, the Consumer and also has the Provider Output is not empty Condition.

When there’s no repeater content or its subfields are empty, the container and all the elements (Sub-fields) within it will not be displayed.

Hope that helps.

Thanks @christian - I had that for the individual divs that were providers/consumers, but the master column it didn’t work, it just always hid them as the master column couldn’t have more than 1 provider to check against.
In the end I just added an ACF checkbox with conditional logic. ‘Does the article have a video: yes/no’ and then checking against that for the master column. Not quite as seamless but not too bad!

Hi @RubberDuckers,

We’re glad that you’re able to find an alternative way to fix your issue. If you have any other concerns or clarifications regarding our theme features, feel free to open up a new thread.

Thank you.

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