Skip Navigation

[Assigned] Conditional with relatioship

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 1 replies, has 1 voice.

Last updated by pierre-yvesC 17 hours, 48 minutes ago.

Assisted by: Minesh.

Author
Posts
#2834452

I'm not able to show something only when a field has something. Otherwise, if it's empty, it's hidden

I use legacy view.

I tried:
[wpv-conditional if="( NOT(empty($(wpcf-mission-de-l-organisme))) )"]
[wpv-conditional if="( $(wpcf-mission-de-l-organisme) ne '' )"]
[wpv-conditional if="( $(wpcf-mission-de-l-organisme) eq '' )" evaluate="false"]

I tried all 3 solutions on a test site and all 3 are working.

Except in my real web site, there is a relationship involved (organisme-poste)

So I tried
[wpv-conditional if="( NOT(empty($(wpcf-mission-de-l-organisme item='@organisme-poste.parent'))) )"]
And
[wpv-conditional if="( NOT(empty($(wpcf-mission-de-l-organisme @organisme-poste.parent))) )"]

With no luck, I may don't have the correct syntax.

Any help would be appreciated.

Thx

#2834518

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I wuould like to know the field you want to check agains is it belongs to parent post and you added condition on child post?

Can you please share problem URL and admin access details and tell me what field you want to check agains as not emaplty and tell me your expected results.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.