Archived topic
Youtube Videos not displaying correctly
9 replies · Started by Daniel on November 30, 2018
Hello
I have installed Gutenberg as a plugin on my website and i have a problem with displaying youtube videos. The videos are not being displayed as they appear in Gutenberg. On the website they have a bigger height which makes them look ugly.
Screenshots: Gutenberg View: http://prntscr.com/lp6mq2 Website View:https://www.thebestpicks.com/top-30-fastest-cars-in-the-world-2/
Can anyone explain why is this happening?
I have no problems with videos when i'm using visual composer : https://www.thebestpicks.com/top-30-fastest-cars-in-the-world/
Hi there,
Gutenberg comes with more opinionated styles which we've opted not to include by default, as it adds another stylesheet.
You can add these like this:
add_action( 'after_setup_theme', function() {
add_theme_support( 'wp-block-styles' );
} );
Let me know if this helps or not :)
Where should i add this to? The functions.php ??
If you're using a child theme, then yes.
If not, any one of these methods will work: https://docs.generatepress.com/article/adding-php/
So i have added the code using the plugin snippets and it doesn't work. Screenshot of the code : http://prntscr.com/lsfboa
Website url: https://www.thebestpicks.com/top-30-fastest-cars-in-the-world/
Can you try clearing any caching plugins? I see Cloudflare and maybe a Siteground caching plugin.
Let me know :)
I did that but same thing happens, i have also accessed website from my phone but same thing happens.
Can you try this function instead?:
add_action( 'after_setup_theme', function() {
add_theme_support( 'responsive-embeds' );
} );
Let me know :)
It worked thanks for help!
You're welcome :)