add_editor_style() Seems to Do Nothing
-
I’m attempting to add styles to Gutenberg editor in a child theme, but
add_editor_style()
doesn’t seem to affect anything.functions.php:
function style_editor() { add_theme_support( 'editor-styles' ); add_editor_style( 'style-editor.css' ); } // Remove the parent theme's editor styles function remove_action( 'after_setup_theme', 'twenty_twenty_one_setup' ); add_action( 'after_setup_theme', 'style_editor' );
style-editor.css:
body { background-color: #fff; color: #000; }
I’d expect this to work, but the only way to get it working is to go into the parent functions.php and comment out
add_action( 'after_setup_theme', 'twenty_twenty_one_setup' );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘add_editor_style() Seems to Do Nothing’ is closed to new replies.