Skip Navigation

[Resolved] I am trying to display a youtube video from a url field in a fronted template

This support ticket is created 5 years, 1 month 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 1 reply, has 2 voices.

Last updated by Luo Yang 5 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1207218

I have a custom field youtube video in a custom type and I want to display this link as a video in the type's template

i tries to use the bootstrap filed of responsive embed linked to that url custom field (both raw or url) but i got a white screen

<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src=[types field='youtube-link' output='raw'][/types] allowfullscreen></iframe></div>

also in the latest version i cannot find the cred and the css and java fields . Did you remove them in that version ?

thanks a lot

#1207376
css-js.JPG

Hello,

There is a built-in "Embedded Media" field within Toolset Types plugin, for example, you can try these:
1) Edit the custom field "youtube-link", "Field type" switch to: Embedded Media
2) Edit your post, fill the Youtube link value in field "youtube-link", for example:
hidden link
3) Display "youtube-link" field value with Types shortcode, like this:

<div class="embed-responsive embed-responsive-16by9">
[types field='youtube-link'][/types]
</div

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

For the question:
in the latest version i cannot find the cred and the css and java fields

When you edit a Toolset form, in section "Form editor", you can setup your custom CSS codes and Javascript codes into section "CSS Editor" and "JS Editor", see screenshot: css-js.JPG

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