[Resolved] trying to embed a video by views shortcode
This support ticket is created 6 years, 10 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I am trying to: embed a video due to the code:
<iframe width="300" height="200"
src=[types field='class-url' id="18" output='raw'][/types]>
</iframe>;
where class-url is a toolset custom field that point to a specific url
the shortcode is valid and i can see it in a html page - but something doesnt work when i try to use it as a url in a iframe embed code
what can i do?
If you want to display an embedded video you should probably take advantage of WordPress's in-built embed capabilities, accessible with Toolset using the Embedded Media custom field type.
Use that to store the URLs of your videos and insert the field using the Fields and Views button to insert the video with the options you require.
It is not enough to just put a youtube video URL as the src of an iframe, you would need to use the embed URL (which you can get if you use the share button on a video).
So for youtube
// this doesn't work
<iframe width="560" height="315" src="<em><u>hidden link</u></em>" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
// this does work
<iframe width="560" height="315" src="<em><u>hidden link</u></em>" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>