Skip Navigation

[Resolved] Passing YouTube parameters does not work

This support ticket is created 5 years, 9 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by MikeT458 5 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#948934

I am trying to: display a YouTube video with certain parameters set

Link to a page where the issue can be seen: n/a localhost

I expected to see: Video that does not show related videos at the end and no controls at the bottom

Instead, I got: A normal YouTube video

I have a CPT called video clips. One of the fields is a text field with the YouTube URL with parameters attached:

<em><u>hidden link</u></em>

When I view the source, this is not what is being passed:

<div class="ast-oembed-container"><div class="ast-oembed-container"><iframe width="500" height="281" src="<em><u>hidden link</u></em>" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div></div>

I need to be able to pass the parameters in . Thanks for any help.

#948984
youtube.JPG

Hello,

I have tested the youtube video you mentioned above:
hidden link

click the "Share" button, click "Embed Video", disable options:
1) Show suggested videos when the video finishes.
2) Show player controls.
I get this codes:

<iframe width="560" height="315" src="<em><u>hidden link</u></em>" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

See screenshot youtube.JPG

So you just need to use below the URL as "YouTube URL" field value:

<em><u>hidden link</u></em>

See below demo site:
hidden link

#950030

Luo,
I am trying to put this into a content template for the Video Clips CPT. I am following the instructions for integrating Toolset Views with Beaver Builder.

https://toolset.com/documentation/user-guides/using-toolset-with-beaver-builder/designing-templates-for-custom-post-types-and-custom-fields-with-beaver-builder/

So:

1. How did you define the URL field in the CPT Custom Fields? Video? URL? Single Line?
2. What Beaver Builder module did you use in the content template? Text? HTML? Video?

I'm trying various combinations for both but I can't seem to find the correct combination.

#950041

There isn't Beaver Builder in the discover-wp, and in your case it is not needed, you just need to output the HTML codes according to youtube settings.

Here are detail steps:
1) Create a custom single line field "youtube-url"
hidden link
user/pass: xgren/111111

2) Create a content template with below codes:

<div class="ast-oembed-container"><iframe width="560" height="315" src="[types field='youtube-url'][/types]" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div>

hidden link

3) Create a post and display above content template:
[wpv-post-body view_template="passing-youtube-parameters-does-not-work"]

See it works fine:
hidden link

#954402

See notes above.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.