Home › Forums › Pro Support › Set background colour with acf field value › Reply To: Set background colour with acf field value
September 10, 2018 at 8:14 pm
#5888
Keymaster
Hey Paul,
You could try something like this:
add_filter( 'wpsp_settings', function( $settings ) {
$color = get_post_meta( get_the_ID(), '_my_color', true );
if ( $color ) {
$settings['inner_wrapper_style'][] = 'background-color:' . $color;
}
return $settings;
} );
Let me know 🙂