Author feigner
2016
3
26
Premium
Ambassador
Rank 26
Unfollow

Stopping Related videos at the end of embedded Youtube video playing

Since Google has taken over Youtube they have changed the way you can play embedded videos from Youtube.

I know I would like to prevent other videos being displayed at the end of the video to prevent people clicking on them to jump of the site.

But Google has taken away the direct command to do this.

So is there any way to prevent them being shown.

I discovered that there is a rel=0 command you can add to the embed code to display related videos from the same channel, but this still shows videos.

While browsing for something else in the plugin directory I scanned down to come across another plugin for Youtube called 'Youtube embed' plugin by embedplus team.

Looking at the description it stated that you can turn off the related videos, so it was worth a try on a test site.

The plugin states that it is compatible with the Gutenberg (block) editor as well as the classic.

For this trial I am trying a classic editor.

Installation

So install the plugin in the standard method.

And activate it.

You get a wizard popup - I cancelled that, but you can go through it if you want to.

After installation you get a new menu item in your wordpress dashboard- youtube free.

Clicking on this gets you to the settings menu.

The one which is most interesting is the hide related videos.

The other one is to hide the quick setup guide.

Go through the others and set or not as you wish to show the videos.

Click save before changing tabs.

In operation

To use this plugin you go to the article you want the video embedded in and click on the new 'youtube' button at the top.

A visual wizard pops up and allows you to select a single video, a playlist , live streaming or a channel.

I didn't investigate the other options - I suspect you might need a google api key ( easily obtained follow the help video) and clicked on the embed a single video.

You can either search for a video ( requires an api key) or just enter a video url ( note this is the one which is displayed when you click on the share arrow under the video.

Pasting this into the box allows you to embed automatically or copy the shortcode if your cursor is not in the right position.

Note - the shortcode is entered into the visual editor not the text editor.

Pasting the code into your article will only show the shortcode until you preview it.

Then you will see the video.

In Use

I played it, and skipped to near the end, and on finishing no related videos were shown.

So at the moment ( april 2019) this plugin will prevent related videos from being displayed.

For me the only problem is that you never see the code used to prevent the related videos being displayed at the end.

But being an engineer - i just viewed the source code for the page and got the code.

There is a data-relstop="1" command in there that maybe stopping them but it is part of a code to prevent it.

I hope this helps those members who have been asking for a solution to this problem.

If it does , don't forget to click on the like button and leave a comment below.

Join the Discussion
Write something…
Recent messages
Loes Premium
Super! I will add this link to my blog! Thank you so much!
Reply
feigner Premium
thanks Loes - nice clean videos do make a difference without the temptation to click away at the end.
Reply
Loes Premium
That's right, I found another way to display moving images too, by converting 30 sec. of videos into a gif, you should try that, amazingly easy https://ezgif.com
Reply
feigner Premium
thanks Loes, will have a look
Reply
Lito-Jhie Premium
Thanks so much Phil!
I just embedded my youtube video on my post for the first time and the related videos are not good to see. I'm so glad i came across your training!

To our success in the online world! 😃
Cheers!
Jhie
Reply
feigner Premium
glad to have helped.
they are annoying but this gets rid of them
good luck
phil
Reply
DCDT Premium
Oh my goodness, this is so timely! I just put up a post with two short videos embedded, and I was annoyed with the videos at the end as one for sure takes people to a direct competitor. I didn't think there was any way to prevent this !

I'm going to go try right now! Thank you so much for sharing!
Brooke
Reply
feigner Premium
that's no worries - hopefully it will cure your problem.
good luck
phil
Reply
CandP Premium
This is excellent to know, thank you! We have saved it.
C & P
Reply
feigner Premium
hope you will be able to make use of it in the future
good luck
phil
Reply
MarionBlack Premium
OMG IT WORKS!

Maybe I should cancel my Vimeo account (just kidding).
Reply
feigner Premium
tell me about it - i was as suprised as you.
there must be some command left in place to do it but they are not telling us about it.
i found a few videos which did this but could not find the code - i think they are using this.
haven't tried adding relstop="0" to the embed string yet, but this works.
Reply
Top