Skip Navigation

[Resuelto] Custom Search on a Taxonomy View.

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
Can I add a Custom Search to a Taxonomy View?
If so, how?

Solution:
It is not possible to have a Custom Search (for the front end) on a View queriying Taxonomy

This support ticket is created hace 7 años, 8 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Este tema contiene 4 respuestas, tiene 2 mensajes.

Última actualización por Daniel hace 7 años, 8 meses.

Asistido por: Beda.

Autor
Mensajes
#435782

Hi,

I have a CPT view here enlace oculto which I can filter with the search form next to it correctly.

When I filter the loop by a taxonomy term, the rest of filters in the search form hide the taxonomy terms that don't belong to any of the filtered items in the loop.

I have duplicated the whole view and assigned it to the taxonomy view for this CPT but the search form doesn't work as I expected.

Here is an example: enlace oculto

This is a taxonomy view which only returns two items for the given taxonomy, but the search form filter allow me to select all the terms available for all the items, not only the filtered ones.

In the example above, the search form should only display the tems like this: enlace oculto

¿Is it possible to have this behaviour of the search form in the taxonomy view?

Thanks
Daniel

#436015

You can not have Custom Filters on Taxonomy Views or User Views.
Only Post Views can have taxonomy Filters.

I am not even sure how you brought the Custom Search Form to be visible on a Taxonomy View, this is not possible since the Filter section is not avialble - I mean the "Add filter" Button is not present.

For the exact reason that this is not possible.

Probably duplicating the View makes the filter appear, since the View does at the moment of duplication not know that you are going to query Taxonomies.

This will not work. Taxonomies can not be Queried with a Custom Search.

#436025

Thank you Beda

I won't use this method then. What I want to achieve is to re-use the same View here: enlace oculto in other pages but with the list of items already filtered by a taxonomy.

So a user enters that page displaying already filtered content and they only see items in that taxonomy. They should be able to use the search form next to it to go deeper in filtering the results.

I'm trying to avoid creating new views in the backend if this is posible.

In the documentantion I found something about using the view shortcode but with filtered content. I don't know if this is the right way.

#436880

You can do that.

YOu duplicate your View, and now add a Query Filter for the taxonomy you want to filter by.

Keep in mind a Query Filter can be used only once, this means, if you query filter by a Taxonomy, you can not add this same taxonomy to the Custom Search.

This will allow you to present "narrowed down" Views (that output only a certain chunk of information) and then "fine filter" by other terms, field values or Parent Relationships on the Custom Filter.

#437949

Thank you Beda!

I was able to get it applying the filter with shortcode attributes.

Este ticket ya está cerrado. Si eres cliente de Toolset y necesitas ayuda relacionada, abre un nuevo ticket de soporte.