Skip to content

Instantly share code, notes, and snippets.

@wplit
Last active April 16, 2019 16:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wplit/a1cf4a9dd5d9a1413ab01b56d68cf9d5 to your computer and use it in GitHub Desktop.
Save wplit/a1cf4a9dd5d9a1413ab01b56d68cf9d5 to your computer and use it in GitHub Desktop.
Add backend styles for gutenberg, where style-editor.css is not available from theme. (like with Oxygen)
add_action( 'enqueue_block_editor_assets', 'lit_add_gutenberg_styles' );
/**
* Add backend styles for Gutenberg
*/
function lit_add_gutenberg_styles() {
wp_enqueue_style( 'custom-gutenberg-editor-styles', plugin_dir_url( __FILE__ ) . '/editor-styles.css');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment