Home › Toolset Professional Support › [Resolved] i need to display the archive only for a product category, not for all products
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.
Tagged: Views, Views plugin, WordPress Archives
This topic contains 1 reply, has 2 voices.
Last updated by Nigel 4 years, 4 months ago.
Assigned support staff: Nigel.
I am trying to: created different archive views for different product categories. So far I saw I can choose different archive views for different taxonomies, but not for categories.
I have 2 product categories:
1) regular diamonds
2) colored diamonds
the regular diamonds need to be in a table.
the colored diamonds in a grid.
English (English )
Spanish (Español )
Toolset enables you to customise WordPress archives without code, but it doesn't have the same granular level of control as the native WordPress template hierarchy.
Toolset lets you specify a custom template to use for displaying category archives (for any category), but stops short of the native WordPress ability to use different templates for different categories. (You can see how this works in native WP here: https://developer.wordpress.org/themes/basics/template-hierarchy/#examples.)
So, in Toolset, the same template will be used regardless of the category being viewed.
You can, however, use conditional shortcodes in your custom archive template to output alternate HTML blocks depending on the category being viewed.
You would use conditional shortcodes that looked something like:
[wpv-conditional if="( '[wpv-taxonomy-slug]' eq 'diamonds' )"]
There is a guide to setting up conditional output here: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
And the reference documentation for the wpv-conditional shortcode is here:
Let me know how you get on.
Known issues and solutions
Frequently asked support questions
Support tickets archive
Get help from experienced contractors
Meet Toolset support team
Toolset Customer Support Policy
Need to tell us something about the quality of support
How to remove personal information from your database for support