Skip Navigation

[Resolved] Remove Youtube related videos when using embedded media

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to turn off "Related Videos" in YouTube videos in embed custom fields. I would also like to use the enhanced privacy (no cookie) mode.

Solution: There's no built-in way to do this, but you could use the raw custom field value to construct an iframe using the proper parameters. The param rel=0 removes the related videos. Example:

<iframe width="500" height="300" src="[wpv-post-field name='wpcf-embed']?feature=oembed&rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>

In this case, the URL of the embed video must be in the format:

https://www.youtube-nocookie.com/embed/C0xc28p4gnE
This support ticket is created 6 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by nicolaT-2 6 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#786507

Hi,
is there a way to hide Youtube's related videos with your "embedded media" custom field? Is it possible to use Youtube's privacy mode (no cookie)?

Thanks,
Nicola

#787310

There's no built-in way to do this, but you could use the raw custom field value to construct an iframe using the proper parameters. The param rel=0 removes the related videos. Example:

<iframe width="500" height="300" src="[wpv-post-field name='wpcf-embed']?feature=oembed&rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>

In this case, the URL of the embed video must be in the format:

<em><u>hidden link</u></em>
#788282

Perfect, thanks a lot Christian!