Conditionally Displaying Looper ACF fields

I have a layout for a single post created. It contains a section I only want displayed if the corresponding ACF repeater field is not empty. Logically, I thought the provider is not empty condition would work for this. It does not and in fact kinda works in reverse – selected is empty displays when it has content.

My set up is:

Section >Row>column>

Container Div element as provider
Child Headline element with static text
Child Headline element as consumer with a static graphic icon

I’ve also tried setting the condition to the ACF field with is not ’ ’ without success. What am I missing here?

Hey Kevin,

Thanks for posting!

You seem to forget to place your Looper Consumer. You will need the condition after the Looper Provider so that it works. If you are still having some difficulties with your layout, please provide us access to the site so we can check your element settings. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

I do have a consumer already established on the 2nd headline element. I need to be able to conditionally hide the static headline based on if the provider ACF field is populated or not. Using current conditions, I have been able to hide the Headline consumer, but not the static Headline.

Hi Kevin,

In that case, we need to investigate it through the WordPress admin dashboard. I would suggest you please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password
– Specific page where you have used it

To create a secure note, click the key icon underneath any of your posts.

Thanks

I have set a secure note. This is a production website, please tread lightly. :slight_smile:

Hi Kevin,

In that case, I would request you please copy your live site to a staging server so we could troubleshoot freely without breaking your live site.
And give us access to the secure note including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

I’ve cloned the site to a test domain and left a new note.

Hi Kevin,

You have a Site Authentication restriction on your website and the given credentials do not work. It might be for the WordPress admin dashboard.

Thanks

I added a new note with the site password

Hello Kevin,

To accomplish what you want, in your DIV (Looper Provider) element, add a Condition {{dc:post:meta key="add_file"}} > 0.

The “Add File” post meta displays the number of array items. It displays `` or null if there aren’t any added files to the bid item. Check out the demo in the secure note below.

Best Regards.

Thanks. I’ll take a look and let you know if I need any follow-up assistance.

You are most welcome, Kevin.

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