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.
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
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.
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