[Resolved] Remove block editor styling that GP adds

Home Forums Support [Resolved] Remove block editor styling that GP adds

Home Forums Support Remove block editor styling that GP adds

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #1243145


    My theme bckgr. color is dark grey, and for my blog posts, I reverse it for better readability experience (I use a black text on a white background). I have a bunch of posts, mostly done with Elementor. Now I would like to continue posting but using Gutenberg (thanks to David for making me decide, this has much more sense).

    The only thing that the block editor on the backend takes styling from GP, i.e. the background for the posts is dark while on the frontend it is white (CSS in a Child theme). How can I make it look the same as on a frontend while I edit or create my posts?

    I searched the GPP support and found most likely this: https://generatepress.com/forums/topic/frontend-styling-for-gutenberg/#post-734784

    There is a code that Tom provides, but how can I implement it? adding to a functions file?

    Thank you in advance,


    Customer Support

    Sorry, it doesn’t work. I have added the lines to a functions file via FTP but it did not take an effect

    remove_action( ‘enqueue_block_editor_assets’, ‘generate_enqueue_backend_block_editor_assets’ );



    Lead Developer
    Lead Developer

    Hi there,

    Try this:

    add_filter( 'generate_show_block_editor_styles', '__return_false' );


    It worked fine! Thank you so much, Tom.

    1. Do you think it is possible for the Block Editor to reflect the body.single width I set in the layout element for blog single posts? It is 830px, no sidebars. Or should I leave it as it is? When creating/editing posts in Elementor, the last displays the width as it is set in the layout element.

    1. A newbie question, should I leave the closing ?> in the functions file (googled it and some say yes, the others, no…)

    Thank you, I appreciate your time,


    Lead Developer
    Lead Developer

    Hi Alec,

    Right now our Elements are visible to the block editor, unfortunately. That makes it impossible to set what options are set.

    You could always insert your own custom CSS into the block editor if you’d like. I can help with the code if you want – just let me know.

    ?> at the end of a file is typically a bad idea – best to leave it out.


    Thank you Tom,

    If I get it right, the options I set in the Element (the width) would not affect the Block editor?
    I also tried to “play” with the Page Builder Container inside the Block Editor and switching between Default to Contained (no sidebars) but It doesn’t seem to be accurate.

    Well, on the frontend the stylings are fine, so I guess I’ll leave that like it is meanwhile.

    Thanks again,

    Have a nice weekend,


    Lead Developer
    Lead Developer

    That’s correct. I’m hoping to figure out a way that the two can communicate.

    The default/full-width options should be fairly accurate in the editor as long as the editor is full width/somewhat close to the width of your website.

    Thanks! You too 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.