Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gutenberg Custom Editor Styles - PHP
<?php
/**
* Enqueue the Gutenberg editor stylesheet.
*
* Put this in your functions.php.
*
* @action enqueue_block_editor_assets
*/
function jr3_enqueue_gutenberg() {
// Make sure you link this to your actual file.
wp_register_style( 'jr3-gutenberg', get_stylesheet_directory_uri() . '/css/editor.css' );
wp_enqueue_style( 'jr3-gutenberg' );
// This font is enqueued for the demo only. You probably won't need this.
wp_register_style( 'jr3-webfonts', 'https://fonts.googleapis.com/css?family=Montserrat' );
wp_enqueue_style( 'jr3-webfonts' );
}
add_action( 'enqueue_block_editor_assets', 'jr3_enqueue_gutenberg' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.