Home › Forums › Pro Support › Set background colour with acf field value › Reply To: Set background colour with acf field value
September 13, 2018 at 3:34 am
#5913
Participant
Sorry Tom, that snippet didn’t work. I substituted my actual acf field name ‘background-colour’ for ‘_my_color’. I then tried setting $color = ‘#666’ to see if a hard-coded hex value would work in case acf wasn’t being set — this added a background colour to the whole wpsp wrapper, not behind each individual item (wp-show-posts-inner).
Is there another way to dynamically set the background colour of each wp-show-posts-inner element to an acf value from the post?
Thanks
Paul