Skip Navigation

[Resolved] template advice

This support ticket is created 5 years, 9 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 6.75 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by jacka-4 5 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1198793

First time playing with templates.
Trying to pull a custom field into a video embed
Template code looks like this:

----- this DOES show the url correctly from the cusstom field, and that is exists -------
[wpv-post-field name="youtube_vimeo_url"]<br>

----- this works with a hard coded youtube url -----<br>
[embed width="123" height="456"]hidden link;

----- this does NOT when pulling custom field value -----<br>
[embed width="123" height="456"][wpv-post-field name="youtube_vimeo_url"][/embed]

#1198851

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jack,

Thank you for contacting our support forum.

Was the video link uploaded in a field that was created in Types ?

If so then you wouldn't need the embed shortcodes.

You can simply do this.

[types field='youtube_vimeo_url' width="123" height="456" ][/types]

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

Please let me know if this helps.
Thanks,
Shane

#1198854

I didnt create it in types. It was an existing system with custom fields.
ACF I think.

Its a regular POST with an additional custom field that contains either a youtube or vimeo url.

#1198862

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jack,

I'm not sure the embed shortcode accepts a shortcode as a parameter so this is why its possibly not working.

What I recommend that you do is to recreate this field in Types so you can use our methods of displaying the embedded media.

If the embed shortcodes that wordpress provides accepts shortcodes then it should work fine but since its not working its only fair to assume that it doesn't.

If there isn't alot of posts that are using this field then you should be able to just quickly re-create this in Types and use the embedded media field and just re-add your links to the posts.

Then you can just display the items without the use of the embed shortcode.

Please let me know if this is clear or if you want me to explain this a little further for you.

Thanks,
Shane

#1198954

Ok... will have to figure out how to migrate the old posts.