Skip Navigation

[Resolved] Make DIV background color equal color picker value

This support ticket is created 8 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 1 reply, has 1 voice.

Last updated by gaborG 8 years, 1 month ago.

Author
Posts
#376560

I added a discount label feature to make courses pop out from the grid when they have a discount going on. There are 2 kinds of discounts: %-based and $-based. I want to give them a different color. I added a color value to the Discount custom post type which is picked up from a color-picker. I want to pass the color to the div's background like this:

<div class="discount" style="background-color: [types field='label-color'][/types];">

Unfortunately it doesn't work. How can I make it work?

#376561

Nevermind. I just forgot to add id="$discount". Silly me.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.