Title: Include PHP within CSS?
Last modified: May 2, 2020

---

# Include PHP within CSS?

 *  Resolved [MindCreatesMeaning](https://wordpress.org/support/users/xizor/)
 * (@xizor)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/include-php-within-css/)
 * 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 [Arun Basil Lal](https://wordpress.org/support/users/arunbasillal/)
 * (@arunbasillal)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/include-php-within-css/#post-12773662)
 * Hello [@xizor](https://wordpress.org/support/users/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](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.

 * ![](https://ps.w.org/admin-css-mu/assets/icon-128x128.png?rev=1401433)
 * [Admin CSS MU](https://wordpress.org/plugins/admin-css-mu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/admin-css-mu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/admin-css-mu/)
 * [Active Topics](https://wordpress.org/support/plugin/admin-css-mu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/admin-css-mu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/admin-css-mu/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Arun Basil Lal](https://wordpress.org/support/users/arunbasillal/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/include-php-within-css/#post-12773662)
 * Status: resolved