Skip Navigation

[Resolved] Displaying a YouTube video

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to display a YouTube video on my site, but when I try to use the embed shortcodes with the raw custom field value, the video URL appears.

Solution: Use the "embedded media" custom field type to display embedded YouTube videos. The embed shortcodes will be applied automatically.

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

0% of people find this useful.

This support ticket is created 6 years, 4 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.

Our next available supporter will start replying to tickets in about 0.21 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by lucyD 6 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#953176

I want to have suppliers in my directory submit a YouTube URL and then that video display on their listing.

I am using Divi from Elegant themes to create the layout for a single listing but if I use the shortcode for the field inside embed it doesn't work, i.e. given the following lines ...

[embed width="600" height="400"]{!{types field='video' output='raw'}!}{!{/types}!}[/embed] => Displays URL only on front-end

[embed width="600" height="400"]hidden link; => Displays embedded video on front-end

How can I get it to accept the shortcode as input?

Thank you,
Lucy

#953211

Hi, the preferred method for implementing embedded video like this is to use the custom field type "Embedded Media". When you use this field type, the embed tags will be applied automatically if you do not choose output="raw". You will be prompted to input the height and width when you insert the custom field shortcode.
https://toolset.com/documentation/customizing-sites-using-php/functions/#embedded-media

#953613

Problem resolved.