Skip Navigation

[Resolved] i need to display the archive only for a product category, not for all products

This support ticket is created 7 years, 9 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 7 years, 9 months ago.

Assisted by: Nigel.

Author
Posts
#406233

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.

thanks!

ido

#406382

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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' )"]
...
[/wpv-conditional]

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:
https://toolset.com/documentation/views-shortcodes/#wpv-conditional

Let me know how you get on.

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