Looper Dynamic Background Color

I have a looper consumer on a row. Is it possible to choose a background color based on a dynamic value from the looper provider?

Thanks.

Hi @tektonministries,

Regretfully, there is no such option to set the background color through the Looper Provider.

Thanks

Ok thanks.

I’m using ACF with a dropdown field that has choices with a value and a label like this:

keynote-speaker : Keynote Speaker
parish-mission : Parish Mission
radio-show : Radio Show

Is there a way to pull out either the value or the label as separate values using dynamic content?

This will pull out both when I have ACF return it as an array: {{dc:acf:post_field field=“event_type”}}

I don’t see a way to pull them out individually.

Hi @tektonministries,

In that case, you need to set the {{dc:acf:post_field field=“event_type”}} into the Dynamic Content of the Looper Provider and use the {{dc:looper:field key=“keynote-speaker”}} inside the looper. I would suggest you go through the following documentation which may help you.


Thanks

I already have the Looper Provider set up to pull all items from that post type. I just need to get the value and the label of the ACF selected option.

I assume that means I have to add another Looper Provider inside the top one so I can loop through the array value returned by the Select option. Is that right?

It’s not working. This line doesn’t seem right: {{dc:looper:field key=“keynote-speaker”}}. keynote-speaker is an option value. It seems like I might need an index number to pull out the first item in the array. Would that work?

Thanks for helping.

Hey @tektonministries,

Would you mind sharing your admin credentials so that we can check on your setup properly? To do that, please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password
  • Page URL or Layout Builder Name

You can find the Secure Note button at the bottom of your posts.

Thank you.

Sorry but I’d rather not share the credentials.

Hi @tektonministries,

If you are not comfortable sharing the credential, please copy your live site to a staging server so we could troubleshoot freely without breaking your live site.
And give us access in the secure note including:

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

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

Thanks

Thanks but I’d rather not take the time to set that up.

Is there a way to explain how to get the value and label of a ACF dropdown within a Looper Provider? Do I need to loop through the array values of the dropdown? If so, how do I reference them?

Thanks.

Hello @tektonministries,

The ACF select option will return a value, label or array. You cannot output the choices.

For some reference:

Hope this helps.

Those did help. Thanks.

Hey @tektonministries ,

You’re welcome! 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.