• Hi, thanks for the awesome plugin! I am trying to set up the feature to automatically transform all core/embed YouTube videos in my posts to your better YouTube block, but can’t get it to work.

    I have tried putting both lines
    define(‘BYEB_SPEED_UP_YOUTUBE_VIDEOS’, true); AND add_filter( ‘byeb_speed_up_youtube_videos’, ‘__return_true’ ); … in my Astra child themes “funtions.php

    and I’ve also tried putting define(‘BYEB_SPEED_UP_YOUTUBE_VIDEOS’, true); in my actual config.php file
    … but when I clear cache and refresh the post the youtube videos are still the standard embed
    Am I doing something wrong, does it not work like this?
    Many thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Phi Phan

    (@mr2p)

    Hi @dmattock,

    For old videos to be convertible to this block, they must have been created using the core/embed block, not the old classic editor. If your core/embed YouTube videos cannot be converted to this block, please provide me with your test page. I need it to investigate the issue.

    Best, Phi.

    Thread Starter dmattock

    (@dmattock)

    Hi Phi, thanks for the quick reply. I am using the newer guttenberg block editor NOT the old classic editor, and I’m using the standard embed block

    My site is still being built so redirects to a coming soon page, but I’ve temporarily disabled it so you can see the issue. Here is a test url: https://midlifehealth.io/how-to-create-balanced-workout-routine-for-busy-over-40-professional/

    Scroll down a little way to the first video, I have used a standard embed block here but its not converting to your betterYoutube block

    Can I ask, if its ok to add the ‘add_filter’ code to my child themes functions.php file? or it HAS to go in the config.php main file? I have tried both though
    Many thanks for the help!

    Plugin Author Phi Phan

    (@mr2p)

    Hi @dmattock,

    I just took a quick look at the code of the Astra theme. It has its own code to handle embeds, which conflicts with this block. If you still want to use this block, you can disable the code from the Astra theme with this snippet:

    add_filter('astra_fullwidth_oembed', '__return_false');

    You can put the code in the functions.php file.

    Best, Phi.

    Thread Starter dmattock

    (@dmattock)

    Thanks so much for the speedy reply, awesome support! ??
    Unfortunately this still doesn’t work for me, no worries, I’ll just add have to swap the standard embeds for the BetterYoutube blocks manually, its not too much work, I was just hoping top streamline things

    Thanks again, much appreciated

    Plugin Author Phi Phan

    (@mr2p)

    You’re welcome.

    Happy new year!
    Phi.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Help with automatically transforming all core/embed YouTube videos’ is closed to new replies.