Is it possible to use the looper and advanced custom fields to create unique div ids or classes?

I have a custom field in my custom post type named ‘category’. On the front end, I would like to display the list of categories AND color code them.

For example, a post could have category: news, weather, updates, and on the front end, all three would be displayed with their own class - then css’d to have a unique color.

Is this somehow possible with the looper provider/consumer and ACF?

Thank you,

Hello @mrcanngo,

Thanks for writing to us.

Do you want to list all the custom field values on the front end? If yes then you can use the dynamic content code to display the custom fields value. Please note it would only display the only those meta that is associated with the posts only.

Or

I would suggest you in place of custom filed, you can use Custom Taxonomy then you can list all the terms through the Lopper Provider. You need to set the Looper Provide as All terms —>Select the Taxonomy

Test-Page-Builder-Pro (34)

Hope it helps
Thanks

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