Title: Single Shared Stylesheet
Last modified: December 16, 2020

---

# Single Shared Stylesheet

 *  Resolved [carlfmichel](https://wordpress.org/support/users/carlfmichel/)
 * (@carlfmichel)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/single-shared-stylesheet/)
 * First of all, wonderful plugin! Thank you for making it available. I’m using 
   the flexible content with dynamic rendering. I have set all the layouts to pull
   their css styling from the main css file of the site. However I’m noticing that
   when I have multiple layouts on a page that the main style sheet is being add
   multiple times on the front-end. Do you have any recommendations on how I might
   be able to have the layouts pull from the main stylesheet of the site but not
   have it include the same stylesheet for each layout and also still perform the
   dynamic render? The reason why I am using the same style sheet is because I have
   baked in a bunch of global styling that the layouts and many other elements on
   the site pull from.
 * Thank you in advance for your insights!

Viewing 1 replies (of 1 total)

 *  Plugin Author [Konrad Chmielewski](https://wordpress.org/support/users/hwk-fr/)
 * (@hwk-fr)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/single-shared-stylesheet/#post-13858514)
 * Hello,
 * Thanks for the feedback and sorry for the late answer. The reason why the layouts
   CSS styles are enqueued multiple times is because you use the same CSS file in
   all layouts settings, and those files are rendered using a dynamic enqueue name
   based on the layout name (thus the duplication).
 * If you want to use a global CSS file (and not splitted CSS enqueue files), then
   you should leave the CSS render files settings empty, and use the following code
   to enqueue a global CSS file when the Flexible Content is rendered:
 *     ```
       add_action('acfe/flexible/enqueue/name=my_flexible', 'my_acf_flexible_enqueue', 10, 2);
       function my_acf_flexible_enqueue($field, $is_preview){
   
           wp_enqueue_style('my-style', 'https://www.example.com/style.css');
   
       }
       ```
   
 * You’ll find more code example in [the FAQ here](https://wordpress.org/plugins/acf-extended/#%0Ahow%20to%20enqueue%20new%20style%2Fscript%20files%20in%20the%20flexible%20content%20in%20php%3F%0A).
 * Hope it helps!
 * Regards.

Viewing 1 replies (of 1 total)

The topic ‘Single Shared Stylesheet’ is closed to new replies.

 * ![](https://ps.w.org/acf-extended/assets/icon-256x256.png?rev=2071550)
 * [Advanced Custom Fields: Extended](https://wordpress.org/plugins/acf-extended/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/acf-extended/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/acf-extended/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-extended/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-extended/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-extended/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Konrad Chmielewski](https://wordpress.org/support/users/hwk-fr/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/single-shared-stylesheet/#post-13858514)
 * Status: resolved