Skip Navigation

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

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)

This topic contains 2 replies, has 2 voices.

Last updated by romanB-3 1 year, 7 months ago.

Assisted by: Minesh.

Author
Posts
#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. : hidden link LINE 15

#2443291

Minesh
Supporter

Languages: English (English )

Timezone: 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!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.