Skip Navigation

[Resolved] display custom field of current post only

This support ticket is created 7 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 – 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 1 reply, has 1 voice.

Last updated by Ido Angel 7 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#582163

hey,
i have a "youtube video id" custom field.
the intention is to insert an iframe with the video id to a certain post. no problem.
now, i know content templates can achieve that. but the thing is i don't want all posts to show a video, only some. so i thought i'd create a view which will display only this one custom field, and that it would show only the field related to the current post, when inserted into a post body. but instead it gives me ALL the "youtube video id"s from all the post which have any.
this is strange, becasue in the loop wizard. when editing the custom post type, under "post selection" it says "The current post being displayed either directly or in a View loop".
i tried to add a filter, but only taxonomies can have the "set by the current post in the loop", custom field don't.
and since i don't have a special url parameter (as this isn't a search), i can't filter through that either.
am i missing something?

thanks!
ido

#582165

ok, i'm stupid 🙂
i just had to insert the field in the html and not create a view.