Skip Navigation

[Resuelto] display custom field of current post only

This support ticket is created hace 7 años, 1 mes. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Etiquetado: ,

Este tema contiene 1 respuesta, tiene 1 mensaje.

Última actualización por Ido Angel hace 7 años, 1 mes.

Asistido por: Shane.

Autor
Mensajes
#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.