Custom stylesheet in preview
-
Hi, I would like to add a custom compiled stylesheet to the flexible content -> dynamic preview view.
Atm I have a app.min.css file in theme-folder/build/css/
I would like to add bootstrap etc to the dynamic preview view, but for some reason it overwrites WordPress CSS. This is the code I use for adding the stylesheet to my editor field and this code is placed in functions.php. The field with key=5c24d27d147f2 is the flexible content field.add_action('acfe/flexible/enqueue/key=field_5c24d27d147f2', 'my_acf_flexible_enqueue', 10, 2); function my_acf_flexible_enqueue($field, $is_preview) { wp_enqueue_style('my-style', get_stylesheet_directory_uri() . '/build/css/app.min.css'); }Could you tell me how to implement the bootstrap and some global css once and so it will only be used for the dynamic preview and not for anything else in the wordpress admin view?
The topic ‘Custom stylesheet in preview’ is closed to new replies.