[Resolved] Youtube Videos not displaying correctly

Home Forums Support [Resolved] Youtube Videos not displaying correctly

Home Forums Support Youtube Videos not displaying correctly

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #745086
    Daniel

    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/

    #745129
    Tom
    Lead Developer
    Lead Developer

    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 πŸ™‚

    #745693
    Daniel

    Where should i add this to? The functions.php ??

    #745726
    Tom
    Lead Developer
    Lead Developer

    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/

    #751584
    Daniel

    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/

    #751785
    Tom
    Lead Developer
    Lead Developer

    Can you try clearing any caching plugins? I see Cloudflare and maybe a Siteground caching plugin.

    Let me know πŸ™‚

    #752414
    Daniel

    I did that but same thing happens, i have also accessed website from my phone but same thing happens.

    #752426
    Tom
    Lead Developer
    Lead Developer

    Can you try this function instead?:

    add_action( 'after_setup_theme', function() {
        add_theme_support( 'responsive-embeds' );
    } );

    Let me know πŸ™‚

    #752438
    Daniel

    It worked thanks for help!

    #752935
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

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