Site icon The Digital Marketing Agency

YouTube: Turn off related videos in oEmbed WordPress URLs

This is a follow up to the popular ‘Embedding videos into your WordPress pages or posts‘ post we wrote a while ago.

We often get asked how to remove the display of related videos. These are, by default,  shown at the end of their video when embedding a YouTube video URL in their WordPress site.

It’s actually quite simple.

All you need to do is add ?rel=0 at the end of your video URL like this:
http://www.youtube.com/watch?v=2yH5Q_z59JQ?rel=0

​WordPress uses oEmbed to get the embed code from YouTube.

Since you append the URL with ?rel=0, it fetches an embed code with suggested videos or recommended videos turned off.

Exit mobile version