Skip to content

Instantly share code, notes, and snippets.

@cdils
Last active March 27, 2020 05:49
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save cdils/7140778 to your computer and use it in GitHub Desktop.
Save cdils/7140778 to your computer and use it in GitHub Desktop.
Apply theme's stylesheet to the visual editor.
add_action( 'init', 'cd_add_editor_styles' );
/**
* Apply theme's stylesheet to the visual editor.
*
* @uses add_editor_style() Links a stylesheet to visual editor
* @uses get_stylesheet_uri() Returns URI of theme stylesheet
*/
function cd_add_editor_styles() {
add_editor_style( get_stylesheet_uri() );
}
@BradSmithSC
Copy link

Thanks for posting this Carrie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment