Skip Navigation

[Resolved] add custom product filter dropdown to custom product cat archives

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 5 months ago.

Author
Posts
#2667635
3rd dropdown.png

Tell us what you are trying to do?
i need to add some custom product dropdown filters (each one different, depending on the single product cat archive), something like: i'm in the product cat "books" and i need, just above che product listing columns, to display one ore more dropdown seletor/filter, based on current taxonomy's chidren, ora based on custom taxonomies & custom fields, created with toolset types - the scheme is the following:
1st dropdown = current product category's direct children/subcats
2nd dropdown = custom flat taxonomy (so something like a product_tag) "age" with its values (1-5 years, 6-9 years, and so on)
3rd dropdown = custom ordering, based on relevance, author, illustrator, price and so on (a mix of standard and custom fields) - see attached image

Is there any documentation that you are following?
did not find anything specifically applying to my need

Is there a similar example that we can see?
did not find any

What is the link to your site? hidden link

#2667661

Nigel
Supporter

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

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

Hi there

First let me clarify something about how WordPress taxonomy archives work. (When you create a custom taxonomy archive with Toolset, you are building on top of the underlying WordPress archive query.)

Guessing from your example URL (the site is under construction), you have the "categoria" taxonomy, and "kamishibai" is a term of that taxonomy.

So when you visit the URL /categoria/kamishibai/ the kamishibai term is pre-selected: you cannot display the archive for any other term of the categoria taxonomy at this URL. (You can filter the query by terms of other taxonomies, but not by different terms of the same taxonomy.)

So a dropdown with other terms of the same taxonomy can't be a normal filter dropdown. What you can do is create a taxonomy View to query terms that are children of the current term, and make the output of that View show links to those other term archives, styled to look like a select dropdown. You can then insert that taxonomy View where you want the dropdown to appear in your custom archive.

As for the second dropdown that shows tags, you should just be able to insert a search filter for tags, and in the options specify that it should display as a dropdown.

Regarding the ordering dropdown, you can add front-end filtering controls. I'm not sure whether you are using the legacy editor or the block editor. Here's a link to legacy documentation for adding front-end sorting controls to a View, which is essentially the same with a WordPress archive: https://toolset.com/documentation/legacy-features/views-plugin/allowing-visitors-to-sort-the-front-end-results/

(Similar options are available when using the block editor.)

#2673745

thx! 🙂

Castel confirmed that the issue was resolved on 2023-12-15 09:38:31.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.