This Pro tutorial provides the code for printing custom HTML after looping through rows of a ACF Repeater (available in ACF Pro) that has a couple of Color Picker fields and a Text field.
Field populated when editing a Page:
On the frontend:
The reason for providing a field for text color is that the default dark text color will not be readable if the background color is dark. A light text color can be set for such rows.
We shall set a light gray background color when the user does not pick one. Also, ensure a grayish border-color applies for such rows' output.
Add this PHP code where you want to output the Repeater field:
This is a BricksLabs Pro tutorial.
For full access login below or create your BricksLabs Pro account
Thanks a lot Sridhar,
That’s a very nice useful setup. Could be even more nifty, incorporating one of those automatic color contrasting algorithms for the text part: