Archived topic
Are all GP Sites compatible with Gutenberg Block Editor?
3 replies · Started by Marius on December 13, 2020
Hello,
I want to know if all GP Sites are compatible with Gutenberg Block Editor.
I use the Marketer Site on my Page and I sinf some Issues, where it seems that it is not compatible. For example, when using a quote, the the color options for the quote has no effect.
Hi there,
Yes, all sites are compatible.
Gutenberg has an optional stylesheet that is sometimes required for some of their more opinionated styles. You can try adding this snippet to see if it fixes the issue:
add_action( 'after_setup_theme', function() {
add_theme_support( 'wp-block-styles' );
} );
Hi Tom,
what does this snippet do?
Does it load another css file?
And if so, is this not bad for sitespeed to load another css file?
Hi,
The code lets the theme load wp-block-styles to the live site rather than just using it on live preview within the editor(Gutenberg).
References:
https://wordpress.org/support/topic/wp-block-styles/
https://deliciousbrains.com/preparing-wordpress-themes-gutenberg/
It loads wp-block-library-theme-css on your <head> which is another file within WP core.
And if so, is this not bad for sitespeed to load another css file?
You can check how much of an effect it does to your site on page test websites (GTMetrix, Google PSI, Webpagetest.org). But it shouldn't have that much of an effect especially of your site is well-optimized.