Looper Field key="type" and Conditions

Hej there,

I am trying following:

I am using a CPT with ACF Pro and an image gallery.
Now I want to add videos to the gallery, and it is working.
With loopers, I add the Images to a slider.
With conditions, I want to display either the image element or the video element.
But the conditions are not working as expected – I don’t understand why.

Thanks to {{dc:looper:debug_consumer}} I found the following key:
{{dc:looper:field key=“type”}}

It’s working in text elements and displays either “image” or “video”.
In conditions, I tried:
{{dc:looper:field key=“type”}} is video
and
{{dc:looper:field key=“type”}} is not video

But it’s not working. Am I missing something important?

Looking forward to hearing from you.
Best wishes
Carlo

Hello Carlo,

Thanks for writing in!

You can use IS or IN and make sure that there aren’t any extra spaces or that you have the correct spelling and case. If that does not work, please provide us access to your site so we can check it.

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.

Thank you, @ruenel.
I found the problem.
The “” changed to typographical “” ones.

Best wishes.
Carlo

Hi Carlo,

Glad to know that you are able to find the reason behind it.

Thanks

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