- This topic has 7 replies, 3 voices, and was last updated 11 months, 3 weeks ago by Tom.
April 17, 2020 at 8:24 am #1243145Alec
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,
AlecApril 17, 2020 at 9:22 am #1243203LeoStaffCustomer Support
Yup try one of these methods:
https://docs.generatepress.com/article/adding-php/April 17, 2020 at 10:17 am #1243279Alec
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’ );
AlecApril 17, 2020 at 4:16 pm #1243587TomLead DeveloperLead DeveloperApril 18, 2020 at 5:41 am #1244040Alec
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,
AlecApril 18, 2020 at 9:49 am #1244497TomLead DeveloperLead Developer
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.April 18, 2020 at 10:37 am #1244543Alec
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.
Have a nice weekend,
AlecApril 18, 2020 at 5:24 pm #1244804TomLead DeveloperLead 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 🙂
- You must be logged in to reply to this topic.