Skip Navigation

[Resolved] Conditional post display for taxnonmies

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.

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/Karachi (GMT+05:00)

This topic contains 6 replies, has 2 voices.

Last updated by Waqar 3 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#2199595

The support question is based of previous solution provided by Luo Yang

I'm experiencing issue where the one taxonomy i added to the conditional is simply not showing up on the taxonomy page.

https://toolset.com/forums/topic/conditional-display-of-two-blocks-in-archives/page/2/

Will need to be logged in as site is staging site.

#2200351

Hi,

Thank you for contacting us and I'd be happy to assist.

To troubleshoot this, I'll need to see how this conditional block is set up in the admin area.

Can you please share temporary admin login details, along with the link to the page where the condition is not working as expected?

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

regards,
Waqar

#2200853

Thank you for sharing these details.

I've performed some tests on my website, with similar conditional statements, but, couldn't reproduce this issue. This suggests that something specific to your website is involved.

Do I have your permission to download a clone/snapshot of your website, to investigate this on a different server?

#2204507

Please proceed

#2206137

Any feedback perhaps, thanks you.

#2207817

I apologize for the delay in getting back on this, as we had an unusually busy forum queue this week.

Just wanted to let you know that I'm currently performing some tests on the website's clone and will share my findings shortly.

Thank you for your patience.

#2207937

Thank you for waiting.

During troubleshooting on your website's clone, I noticed that the two conditional blocks used in the archive "George Docs Archives", had a number of repeated conditional statements as well as some incorrect/invalid slug text entries.

I updated those conditional statements and the conditional blocks are started working, as expected.

1. Conditional block 1:

Existing conditional statement:


( ( has_term('financial-reports', 'george-doc-categories', null) eq '1' ) OR ( has_term('integrated-development-plan', 'george-doc-categories', null) eq '1' ) OR ( has_term('integrated-development-plan', 'george-doc-categories', null) eq '1' ) OR ( has_term('sdbip', 'george-doc-categories', null) eq '1' ) OR ( has_term('spacial-development-framework', 'george-doc-categories', null) eq '1' ) OR ( has_term('####', 'george-doc-categories', null) eq '1' ) OR ( has_term('tarrifs-fees-and-fines', 'george-doc-categories', null) eq '1' ) OR ( has_term('annual-report', 'george-doc-categories', null) eq '1' ) OR ( has_term('access-to-information', 'george-doc-categories', null) eq '1' ) OR ( has_term('contracts', 'george-doc-categories', null) eq '1' ) OR ( has_term('current-tenders-supply-chain-management', 'george-doc-categories', null) eq '1' ) OR ( has_term('media-documents', 'george-doc-categories', null) eq '1' ) OR ( has_term('other-publications', 'george-doc-categories', null) eq '1' ) ) 

Updated conditional statement:


( ( has_term('financial-reports', 'george-doc-categories', null) eq '1' ) OR ( has_term('integrated-development-plan', 'george-doc-categories', null) eq '1' ) OR ( has_term('sdbip', 'george-doc-categories', null) eq '1' ) OR ( has_term('spacial-development-framework', 'george-doc-categories', null) eq '1' ) OR ( has_term('tarrifs-fees-and-fines', 'george-doc-categories', null) eq '1' ) OR ( has_term('annual-reports', 'george-doc-categories', null) eq '1' ) OR ( has_term('access-to-information', 'george-doc-categories', null) eq '1' ) OR ( has_term('contracts', 'george-doc-categories', null) eq '1' ) OR ( has_term('current-tenders-supply-chain-management', 'george-doc-categories', null) eq '1' ) OR ( has_term('media-documents', 'george-doc-categories', null) eq '1' ) OR ( has_term('other-publications', 'george-doc-categories', null) eq '1' ) ) 

2. Conditional block 2:

Existing conditional statement:


( ( has_term('current-formal-quotations', 'george-doc-categories', null) eq '1' ) OR ( has_term('bylaws-and-regulations', 'george-doc-categories', null) eq '1' ) OR ( has_term('jobs-and-bursaries', 'george-doc-categories', null) eq '1' ) OR ( has_term('current-tenders-supply-chain-management', 'george-doc-categories', null) eq '1' ) OR ( has_term('annual-reports', 'george-doc-categories', null) eq '1' ) OR ( has_term('budget', 'george-doc-categories', null) eq '1' ) OR ( has_term('2018-2019-annual', 'george-doc-categories', null) eq '1' ) OR ( has_term('annual-reports', 'george-doc-categories', null) eq '1' ) OR ( has_term('council', 'george-doc-categories', null) eq '1' ) OR ( has_term('tenders-and-quotations-awarded', 'george-doc-categories', null) eq '1' ) OR ( has_term('finance', 'george-doc-categories', null) eq '1' ) OR ( has_term('public-notices', 'george-doc-categories', null) eq '1' ) OR ( has_term('annual-reports', 'george-doc-categories', null) eq '1' ) OR ( has_term('2018-2019-annual-reports-documents', 'george-doc-categories', null) eq '1' ) OR ( has_term('2019-2020-annual-reports-documents', 'george-doc-categories', null) eq '1' ) ) 

Updated conditional statement:


( ( has_term('current-formal-quotations', 'george-doc-categories', null) eq '1' ) OR ( has_term('bylaws-and-regulations', 'george-doc-categories', null) eq '1' ) OR ( has_term('jobs-and-bursaries', 'george-doc-categories', null) eq '1' ) OR ( has_term('current-tenders-supply-chain-management', 'george-doc-categories', null) eq '1' ) OR ( has_term('annual-reports', 'george-doc-categories', null) eq '1' ) OR ( has_term('budget', 'george-doc-categories', null) eq '1' ) OR ( has_term('council', 'george-doc-categories', null) eq '1' ) OR ( has_term('tenders-and-quotations-awarded', 'george-doc-categories', null) eq '1' ) OR ( has_term('finance', 'george-doc-categories', null) eq '1' ) OR ( has_term('public-notices', 'george-doc-categories', null) eq '1' ) OR ( has_term('2018-2019-annual-reports-documents', 'george-doc-categories', null) eq '1' ) OR ( has_term('2019-2020-annual-reports-documents', 'george-doc-categories', null) eq '1' ) ) 

I hope this helps and you can update these statements on your live website too.

regards,
Waqar