Skip Navigation

[Resolved] Conditional Display of Two Blocks in Archives

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

Last updated by Luo Yang 3 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#2164183
current-tenders-supply-chain-management.JPG

It is quite confused, we can handle the questions one by one

Q1) Regarding original question...

Please have a look to the URL you mentioned above:
hidden link
I do see results in the view's loop, see my screenshot current-tenders-supply-chain-management.JPG

Where and how can I see the problem you mentioned above: the term that is not displaying any information, can you provide detail steps to reproduce the same problem?

#2164273

Thank you, I also now see the information displayed. I think there is a delay from the time I update the conditionals to the time that it actually displays the changes.

#2164293

It might be a cache issue, is this problem resolved? please update here if you still need assistance for it, thanks

#2164295

Thanks, i am happy with the use of parent term in the conditional.
I however have now tested the multiple terms in the conditional as per below code you provided and it does not work. I have cleared cache.

( ( has_term('current-formal-quotations', 'george-doc-categories', null) eq '1' ) AND ( has_term('current-tenders-supply-chain-management', 'george-doc-categories', null) eq '1' ) )

Link to terms that have been included in hte conditional:

hidden link

hidden link

#2164297

You need to use the conditions operators as "OR", for example:

  ( ( has_term('current-formal-quotations', 'george-doc-categories', null) eq '1' ) OR ( has_term('current-tenders-supply-chain-management', 'george-doc-categories', null) eq '1' ) ) 

it will check if current post has ANY of below terms in taxonomy "george-doc-categories":
- current-formal-quotations
- current-tenders-supply-chain-management
Then output the content

See the document I mentioned above:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional
Boolean operators: AND, OR, NOT