25% off ProSNIPC25OFF

Enqueue a Custom Editor-Only Stylesheet

Loads a theme stylesheet only inside the block editor so you can fine-tune typography and spacing without affecting the front end.

PHPby SnipCraft
php
<?php
if ( ! function_exists( 'scseed_enqueue_editor_stylesheet' ) ) {
    function scseed_enqueue_editor_stylesheet() {
        wp_enqueue_style(
            'scseed-editor-styles',
            get_stylesheet_directory_uri() . '/editor-style.css',
            array(),
            wp_get_theme()->get( 'Version' )
        );
    }
    add_action( 'enqueue_block_editor_assets', 'scseed_enqueue_editor_stylesheet' );
}
#admin#css#editor#gutenberg