Skip Navigation

[Resolved] Custom Archive Templates not displaying.

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

Last updated by fleurP 2 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#2216799
Screenshot-2021-11-09-at-16.38.01.jpg
Screenshot-2021-11-09-at-16.38.22.jpg
Screenshot-2021-11-09-at-16.37.53.jpg

Archive Templates is not showing on frontend.

hidden link

#2217327

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

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

From the screenshots, it seems to be the same issue that was covered in another ticket, recently.

Can you please make sure that the conditional statements in the archive are fixed, as suggested in my reply at:
https://toolset.com/forums/topic/conditional-post-display-for-taxnonmies/#post-2207937

Once the conditional statements are fixed, the content of the archive results will start showing correctly.

regards,
Waqar

#2217345

Morning, they were fixed. I however transfered the modules and data over to another site and since then it stopped working. Can i provide you login details?

#2217357

I have fixed the previous post concerns. I however moved the site to a new domain. Since then it stopped working. Can I provide you login details. Please make post private.

#2217359

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for the update and I've set your next reply as private.

Note: It is recommended to make a complete backup copy, before sharing the access details.

#2217405

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing the admin access.

I noticed that "has_term" function was not added in the "Functions inside conditional evaluations" section at WP Admin -> Toolset -> Settings -> Front-end Content, so I added that.
( screenshot: hidden link )

Next, as suggested in the reply to the other ticket, I updated the first conditional block's statement from:


( ( 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' ) )

To:


( ( 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' ) ) 

And in the second conditional block, updated the statement from:


( ( 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' ) )

To:


( ( 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' ) ) 

After these changes, the results are showing correctly on the archive page now.

#2217409

Thank you, i have hoever noticed that after importing my data, that all categories hierarchy structure has been lossed which is causing problem with the conditionals. How can I import the data without the Parent Child Structure being changed?

#2217515

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

It is safer and more efficient to use WordPress backup & restore plugins, to migrate the website as a whole.

These are the plugins that we use and recommend:
https://wordpress.org/plugins/duplicator/
https://wordpress.org/plugins/all-in-one-wp-migration/

#2217555

Old site is problematic. Hence the reason I have to move the data over manually. Would the CPT categories be found under the wp_term_taxonomy?

#2217601

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Yes, the "wp_term_taxonomy" table holds information about all terms and the taxonomy that they belong to. But, the taxonomy and terms information is scattered across multiple tables, as explained in these guides:
https://code.tutsplus.com/tutorials/understanding-and-working-with-taxonomies-and-terms-in-wordpress--cms-21051
hidden link

There are third-party import-export plugins available too, which can be used to move only selective data:
hidden link

#2217629

Thanks, I managed to import the taxonomies. I still have problem however as the conditional displays are not working as per the conditions setup.

Example 1:
hidden link
Suppose to only show download option and not have click through to post page.

Example 2:
hidden link
hidden link
hidden link
The above is a few of the terms that are mentioned in the conditional that is not showing the "view" button with click through to post and infotmation.

the above is but a few examples. Most of the posts under the CPT are not displaying as per the condtional

#2218179

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for writing back.

1. hidden link
Suppose to only show download option and not have click through to post page.

- When I checked the page, all the results were showing correctly showing the "Download" block and not the "View" block.
( screenshot: hidden link )

2. hidden link
- This is the archive page for the term with slug "tenders-and-quotations-awarded", which is included in the second conditional block for the "View" block.

And all the results on this page are showing the "View" block.
( screenshot: hidden link )

3. hidden link
- This is the archive page for the term with slug "planning-and-development", which is not included in any conditional blocks. But its parent term "bylaws-and-regulations" is in the first conditional block for the "Download" block.

And all the results on this page are showing the "Download" block.
( screenshot: hidden link )

4. hidden link
- This is the archive page for the term with slug "current-tenders", which is not included in any conditional blocks. And its parent term "supply-chain-management" or its parent "documents", isn't available in any conditional blocks either.

And for this reason, no block is showing for the results on this page.
( screenshot: hidden link )

Note: In both conditional blocks slug "current-tenders-supply-chain-management" is used but there is no term with this slug on your website. If you've renamed this term now to "supply-chain-management", you can update that in the conditional blocks too and it will work.

So, based on these points, I couldn't find any case, where the conditional blocks are not working as expected. You'll only have to make sure that the correct slugs and the conditions have been used in the blocks.

#2221357

My issue is resolved now. Thank you!

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