• I would like to pass a value to Admin CSS MU from an ACF Option page color picker. Is there a way that I can include the following? Currently the php content is being stripped at ‘Save’.

    .mybackground-color {	
     		background-color:<?php the_field('page_background_color', 'option'); ?>;
         } 
Viewing 1 replies (of 1 total)
  • Plugin Author ImageArun Basil Lal

    (@arunbasillal)

    Hello @xizor

    Thanks for checking out my plugin. The text area can only accept CSS, so adding PHP code wouldn’t work as you noticed.

    For your use case, it might be better to not use the plugin and add the code directly into functions.php of the theme.

    For inspiration, here is something – http://snippi.com/raw/u8zr99n
    This is untested of course. You will have to add some checks to see if the_field is valid and such.

    Best of luck

Viewing 1 replies (of 1 total)

The topic ‘Include PHP within CSS?’ is closed to new replies.