Skip Navigation

[Resolved] Any way to create View filters as links?

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: 

This topic contains 2 replies, has 2 voices.

Last updated by Kirill 4 years, 12 months ago.

Assigned support staff: Beda.

Author
Posts
#335804

Dear support!

Right now a View lists select, multi-select, checkboxes and radio buttons as possible filter input options. What I need to have is a taxonomy filter that will show an image for each category. When clicked on an image, it will show a view filtered by this particular category.

Is there any way to do that in a relatively simple way? Radio options behave somehow similar to what I need, but in order to achieve a desired behavior I probably have to hide a radio button with CSS, place in an image instead, intercepts clicks on an image with JavaScript and pass them to an invisible radio button. Seems to be pretty complex!

It would be great if there would be an option to display filter inputs as links with text and behavior similar to radio buttons. Then I would be able to style them with pure CSS and get what I want. Is there an options like this for a taxonomy filter? I looked in the docs but found nothing :-(. Are there any other simpler ways to achieve what I need?

Thank you in advance!

Best regards,
Kirill

#335836

Thank you for contacting us here in the Support Forum

It's not possible without modifying the Views Parametric Search with elaborated Custom Code.

Eventual workarounds (but this will not generate Parametric Filters) are

1. Create a View that lists those taxonomies, and for each taxonomy it produces something like
<a href="other page?show_tax=taxonomy ID"><img src="some image url" /></a>

2. on the other page, there will be a view that takes the taxonomy ID from URL parameter and displays the final results
https://toolset.com/documentation/user-guides/passing-arguments-to-views/

This same very similar approach (but with a scroll spy custom JS code, on the same page) is used here:
https://toolset.com/documentation/views-shortcodes/

On the left you see a Taxonomy View, and on the right, the description of those.

Anyway, this are not Parametric Searches as you wish it.

But your request is valid, and I have had several customers asking for a more flexible way to produce Parametric Search Filers, and I think, the option to output a simple (customizable) a href is the best approach.

This would allow you to further customize links and even create "menu" like parametric Searches.

I have added this to our Feature requests list so DEV can take it in consideration for future development.

It seems -unfortunately- that for now you need custom programming work which is beyond the scope of our support.

At this point I would suggest you consider contacting one of our certified partners from this link:
https://toolset.com/consultant/

You will get the custom assistance you need to get on with your project.

Please let me know if you have further questions regarding the issue mentioned in this Thread

Thank you for your patience.

#336020

Beda,
thank you very much for your very detailed answer and a solution offered. What you suggest is definitely a good way to solve this.

I also vote for inclusion of something like this into filter features, as you suggest. That would totally make sense! Since you already have filtering mechanism in place all that is required is just to change a control element. Hope that should not be very hard!

Thank you again for your excellent support!