Skip Navigation

[Résolu] WPV Conditional Else

This support ticket is created Il y a 7 années et 7 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 3 réponses, has 3 voix.

Last updated by michaelR-26 Il y a 7 années et 7 mois.

Assisted by: Nigel.

Auteur
Publications
#432045

My question is very similar to this thread which did not have a clear reply on the Else part.

How to add Else condition inside view? I'm aware of the If part but is there a way to use the Else condition?

#432442

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

Timezone: Europe/London (GMT+01:00)

I think you meant to link to another thread, no?

There is no 'else' when using Views conditional shortcodes.

When you have an "if condition is true" condition, then else would mean "else condition is false".

You can simply create two conditional blocks, one that tests for your condition being true, followed by another block which tests if your condition is false.

See the wpv-conditional reference here: https://toolset.com/documentation/views-shortcodes/#wpv-conditional

#432944

Good to know, thanks Nigel

#1840593

I added this and still not working. The probem may be that when you send code it has a bunch of "' " and I don;t know if I am replacing them correctly.

[wpv-conditional if="( "[wpv-post-taxonomy type="exhibitor-type" format="id" eq '8' )" mode='fade-slide' "]
<label>Welcome Video URL. *YouTube and Vimeo are supported.</label><br/>[cred_field field="welcome-video-url" force_type="field" class="form-control" output="bootstrap"][/wpv-conditional]

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