Home › Forums › Front-end Issues › ACF/PHP in CSS › Reply To: ACF/PHP in CSS
When it comes to WP, you can’t get values from the site by just loading a PHP file. You need to also load a lot of the WordPress code. The best way to do this is by using the admin-ajax script. I posted the basics of a solution for this about 2 years ago here https://wordpress.org/support/topic/best-way-to-create-a-css-file-dynamically?replies=22#post-4857705
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.