Site logo

Archived topic

How to call editor-style.css from child theme?

15 replies · Started by Tudor M on October 30, 2015

Viewing posts 16–16 of 16

This is a pretty old post, but I would like to add a useful snippet after having some problems with the editor-style-css. Sometimes, you can't really see whether the custom styles are loaded or not due to the browser cache. This can get very ennerving, since even deleting the browser cache won't work. I use this workaround that adds a timestamp to the CSS file:

add_editor_style(get_stylesheet_directory_uri() . '/editor-style.css?v=' . filemtime(get_stylesheet_directory() . '/editor-style.css'));

After modifying the file, the timestamp will change and the effects will show immediately.

Took me some time to figure this out. I still don't know why the WordPress editor seems to work differently compared to a standard website.

This archived topic is closed to new replies.