Home Forums ACF PRO Flexible content class


Flexible content class

  • Hi
    I’m loving playing with flexible content to create layouts and streamline my templates. Very awesome!

    Can someone kindly point me in the right direction on something though. I’ve created a 3 column layout with flexible content which works a treat. I now want to have a field where I can select a colour for the layout (e.g. One might have a background colour of white, one may be gray). So I guess I’ll need a field that lets me pick a class but I’m stumped on how to do this and can’t find a workable solution online.

    Thank you

  • So – at the moment I’m using:

    1. A colour Picker field
    2. <div class=”section-space” style=”background-color:<?php the_sub_field(‘colour’); ?>”> In my template

    I don’t like the idea of using inline style. Also – I’d like to make the process of adding colour easier for my client. Currently I would have to tell them what #hex colours to use – not a great idea.

    So any improvements would be great. I’m thinking of a select for colours options perhaps?.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.