Skip Navigation

[Resolved] Conditional display of content from parent field when not empty

This support ticket is created 4 years, 8 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 – 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)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Shane 4 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#1633683

I have an entry that displays content from a parent field:
Visit Website

I would like to conditionally display this information.
'website' not empty then display Visit Website
'website' is empty then it should display nothing

My head is sore from banging it on the desk. Any help would be appreciated.

#1633761

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Susan,

Thank you for getting in touch.

In a case like this I would recommend that you use our conditional shortcode.

Here is an example below.


[wpv-conditional if="('[types field='website' output='raw' item='@label-company-name.parent'][/types]' ne '' )"] 
Displays information when not empty
[/wpv-conditional]

Please try this and let me know if it helps.
Thanks,
Shane