Skip Navigation

[Resolved] Conditional in combination with parent

This support ticket is created 2 years, 6 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 2 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#2198773

Hello,

I have this code that works fine

{!{types field='naam-organisatie' item='@organisatie.parent'}!}{!{/types}!}

and now i want alse refer to @organisatie.parent in my conditional code

[wpv-conditional if="( NOT(empty($(facebook))) )"] here the FB logo [/wpv-conditional]

How can I refer to @organisatie.parent in the wpv-conditional?

Thanks!

#2198785

Hello,

I assume we are talking about one-to-many relationship, you can use the item attribute in wpv-condional shortcode, like this:

[wpv-conditional if="( $(facebook).item(@organisatie.parent) ne '' )"]
Here display something if parent post field is not empty
[/wpv-conditional]
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.