Last active
April 16, 2019 16:08
-
-
Save johnregan3/ae04d69f9046c316480ce0afa22dfb4d to your computer and use it in GitHub Desktop.
Gutenberg Custom Editor Styles - PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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