Skip Navigation

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

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 6 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#610611

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?

#610692

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2018-01-29 at 13.12.48.png

Hi there

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.

https://toolset.com/documentation/customizing-sites-using-php/functions/#embedded-media

#610696

thanks, but i do want to make it mannually by iframe - as i want to embed it in revslider
i tried :

<iframe src="[types field="class-url" id="18" output="raw"][/types]" width="980" height="300"></iframe>

but doesn't work .
if put:
[types field="class-url" id="18" output="raw"][/types]
i see the url right....
What am i doing wrong?

#610704

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

What kind of videos are you trying to embed?

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>