How to Remove Unrelated Videos From All WP Gutenberg Video Embed Blocks

Remove YouTube Related Videos WP Block

Looking to get rid of the annoying and horribly unprofessional “related videos” end screen on your professional YouTube video embeds on your WordPress website?

I’ve put together the perfect simple solution in the form of a small code snippet that you can drop into your theme’s functions.php file.

But First, The Bad News

So, it turns out that Google deprecated the rel=0 feature to disable related videos.  You used to be able to put that on your video embed URL and it would disable the related videos feature.

Then later on, Google partially brought it back, but with the change that rel=0 would only show other videos from the same YouTube channel on the related videos end screen (as opposed to showing a bunch of random videos).

The good news is rel=0 will definitely improve the experience by showing more of your videos at the end instead of other people’s videos.

Now, let’s take a look at how to implement this.

The Gutenberg Video Embed Block is Lacking

You are probably staring at this oversimplified block with absolutely no settings besides the YouTube URL and the block alignment.

Wouldn’t it be nice if they had some settings you could change like modestbranding, showinfo, and rel?

The Code Snippet to Enable ModestBranding and Rel=0

Maybe some day… but for now, here is a small code snippet that you can put in the functions.php  file of your theme or child theme, or using the Code Snippets plugin…

With this code in place, all of your YouTube video blocks across your WordPress website should automatically change so there are no more related videos at the end.

This solution works for videos embedded via the new WordPress block editor (code named Gutenberg).  If you are still using the old WordPress Classic Editor, this solution won’t work.  In that case, you just need to add the parameters in the URL for &modestbranding=1&showinfo=0&rel=0

Notify of
Inline Feedbacks
View all comments