Theme Customizer – Dynamic CSS PHP File
@s_ha_dum is right, the ajax plugin api is the way to go. I ran into this issue myself with a dynamic js file I was generating a little while ago. Basically you would enqueue your style as follows: wp_enqueue_style( ‘dynamic-css’, admin_url(‘admin-ajax.php’).’?action=dynamic_css’, $deps, $ver, $media ); Then create a function to load your dynamic css file: … Read more