Skip Navigation

[Resolved] Can I nest conditional statements?

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

This topic contains 1 reply, has 1 voice.

Last updated by mayurJ 3 years, 2 months ago.

Author
Posts
#2160345
conditional2.png
conditional.png

Tell us what you are trying to do?

I'm trying to prevent a view from appearing on certain post ids. This is the code that I'm using (shortened version below).

[wpv-conditional if="(('[wpv-post-id]' ne '6809') OR ('[wpv-post-id]' ne '6822') OR ('[wpv-post-id]' ne '7391'))"]
<div align='center'>
[wpv-conditional if="( CONTAINS(#(issue-area),'workshops') )"]< back to Workshops<br>[/wpv-conditional]
[/wpv-conditional]
</div>

My intention is that the inner conditions are executed only when the parent condition is met (ie: the view isn't showing on any of the post IDs mentioned.

The screenshots attached here show the view in its complete form (my code above is shortened).

And before you ask, yes, I did try using a post id filter on the view. It had no effect (the view still showed)

Is there any documentation that you are following?
Toolset docs

Is there a similar example that we can see?
Not sure

What is the link to your site?
hidden link

#2160451

OK, looks like was doing it completely wrong and displaying post types, not taxonomgies. I needed to display taxonomies.