Archived topic
Editor Styles, how do I get these to work?
1 reply · Started by Sneaky on June 19, 2022
I use a child theme for the GP theme, which has a few minor styles that I want also shown in the gutenberg editor. For example a global content image style with border, padding, etc.
I tried adding this from other posts on here but I am not able to get it working.
In my functions file in my child theme I have inserted the code;
add_filter( 'generate_editor_styles', function( $editor_styles ) {
$editor_styles[] = 'editor-styles.css'; // Make sure this is name of your child theme style sheet
return $editor_styles;
} );
I have named the style sheet to be editor-styles.css and placed it in my child theme.
but that is not working
Hi Sneaky,
Here’s a reply by Tom which may assist you with regards to this: https://generatepress.com/forums/topic/custom-styles-not-showing-in-gutenberg/#post-808814
Hope this helps!