Support

Account

Home Forums General Issues Advanced Custom Field Plugin Option page in CSS WordPress Custom theme Reply To: Advanced Custom Field Plugin Option page in CSS WordPress Custom theme

  • You cannot use ACF in a php file like this. WP is not set up and no WP or ACF functions will work in the file.

    To do dynamic styles in with ACF you have 3 choices.

    1) Put the styles inline in the in the ducument

    2) Use admin-ajax.php to generate the style css.

    3) Generate a static CSS file on changes

    https://stackoverflow.com/questions/13001922/how-do-you-handle-dynamic-css-in-wordpress

    I generally just put it inline. You’re not going to be generating a lot of styles and it’s more efficient and results in better performance to include small chunks of CSS inline.