Saltar navegación

[Resuelto] #608 wpv-conditional based on field in post parent

This support ticket is created hace 2 años, 6 meses. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por romanB-3 hace 2 años, 6 meses.

Asistido por: Minesh.

Autor
Mensajes
#2443273

Hi,

I need to conditionaly display an element in content template based on if the parent post has a field filled.

I tried

[wpv-conditional if="( '[types field='budget' item='@projet-lie.parent'][/types] ' ne '' )"]

but it doesn't seem to work.

I also tried with the double quotes

[wpv-conditional if="( '[types field="budget" item="@projet-lie.parent"][/types] ' ne '' )"]

but it still doesn't work : the content always displays even if the field budget from projet-lie parent post is empty.

Thanks.

P.S. : enlace oculto LINE 15

#2443291

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Hello. Thank you for contacting the Toolset support.

What if you try to use the following line of code:

[wpv-conditional if="( '[types field='budget' item='@projet-lie.parent'][/types]' ne '')"]

Does that works? if yes, the the issue was the space at after the types shortcode ends, I've removed that space.

'[types field='budget' item='@projet-lie.parent'][/types] '
#2443399

My issue is resolved now. Thank you!