# Add_editor_style not working on staging site

**URL:** https://discourse.roots.io/t/add-editor-style-not-working-on-staging-site/16702
**Category:** sage
**Created:** 2019-09-27T19:14:19Z
**Posts:** 2

## Post 1 by @IceManLoneWolf — 2019-09-27T19:14:19Z

For whatever reason my editor style sheet isn’t being loaded in the editor on my staging sites on cloudways. It works on my live sites (which are also on cloudways) and in my local environments. So I don’t get why they won’t load on the staging site. I’ve tried adding the style using asset\_path and also a relative url where again they work on local and on the actual live versions, but not on the staging.

I should note that I tested add\_editor\_style using the twentynineteen theme and it worked on the staging site. So there’s something about the staging site and sage that don’t get along when it comes to the editor style for some reason.

I was wondering if anyone might have any idea.

I noticed in another topic another user made it sound like add\_editor\_style wasn’t working for him and he enqueued the admin style. So it sounds like he was having a similar issue with whatever server setup he was using.

> [@How to create and use a separate CSS file for Gutenberg editor in Sage 9](https://discourse.roots.io/t/how-to-create-and-use-a-separate-css-file-for-gutenberg-editor-in-sage-9/12847/4):
>
> I only would like to mention in here (might be some time saver for someone until Sage 10 will be released) that if someone is trying to make custom Gutenberg editor styles work in WP admin, just following [this oficial WP codex guide](https://developer.wordpress.org/block-editor/developers/themes/theme-support/) and adding following lines add\_theme\_support( 'editor-styles' ); add\_editor\_style( asset\_path('styles/your-gutenberg-editor-styles.css') ); in after\_setup\_theme action does not work with Sage 9. On the other hand @Simeon solution does fix it indeed. I was bit scept…

---

## Post 2 by @oxyc — 2019-09-30T01:17:22Z

Any chance you’re inculdig some inline svgs or library? I was recently hit by [https://github.com/WordPress/gutenberg/issues/16408](https://github.com/WordPress/gutenberg/issues/16408) when I included Swiper. (PR with patch [https://github.com/WordPress/gutenberg/pull/17146](https://github.com/WordPress/gutenberg/pull/17146)).

It doesnt not fail as obviously if the css in unminified (dev for sure but in case your production happens to run unminified too)

---

## Post 3 by @system — 2019-11-08T19:26:19Z

This topic was automatically closed after 42 days. New replies are no longer allowed.
