Custom Fields
Re-Envisioned
Support General Color Picker and CSS

  • Creator
    Topic
  • #28301
    Resolved contact@percipi.fr
    Participant

    Hi, I'm using Bricks and as color picker in Bricks are not yet dynamic, I wanted to get the color picker value into a css class.
    What is the best way/best practice to achieve that ?
    many thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #28312
    Long Nguyen
    Moderator

    Hi,

    Thank you for getting in touch.

    You can use the code to print the color picker value in Inline CSS. For example:

    $value = rwmb_meta( 'color_picker' );
    ?>
    <style>
        body {
            color: <?php echo $value ?>
        }
    </style>
    #28317
    contact@percipi.fr
    Participant

    Hi many thanks for your help
    that's what I was trying to do, but without success. I think I was adding the code in the wrong place or Bricks doesn't allow PHP in custom code areas. When added manually it works.
    Thanks for confirming the code.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.