Site logo

Archived topic

Editor Styles, how do I get these to work?

1 reply · Started by Sneaky on June 19, 2022

Viewing posts 1–2 of 2

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

This archived topic is closed to new replies.