Hey,
I have a very simple post type called "location", with 2 taxonomies: cities, and streets.
I have about 1200 cities and about 30000 streets.
I build a custom view with a search for locations, with the two select menus of both - and the server can't handle the load. the page and even the view don't even come up.
Is there a way of handling such an amount of taxonomies?
Thanks
Ido
Hello. Thank you for contacting the Toolset support.
To load 1200 and 30000 taxonomy terms as select filter is too much and obviously it will hurt performance and may lead to crash the site.
Even we set to paginate the site site but as its taxonomy filters that having 1200 and 30000 terms, its too much.
I think of only option to setup a taxonomy filter as textbox but natively textbox for taxonomy filter is not supported.
I do not have any solution to share but I found that you can add custom textbox and integrate the autocomplete library.
Please check the following - you will require to change the WP_Query and configure it for tax_query and adjust the code accordingly.
=> versteckter Link
If you do not know how to do it, you may contact certified programmer who can implement such custom integration for you.
hmm but once i do that the search doesn't appear at all in the frontend because now there are no search filters (although I had them stay):
versteckter Link
also, i'm not sure - but would the filtering still affect each other like this? meaning, when i choose a city, will now only the available streets within this city show?
Lets consider that you have only 10 cities and 20 street setup but the dependent dropdown is not possible even with Tooslet as there is no such feature available when you select the city, it should display the associated street.
I'm not sure, if you would like to change your structure where you drop the idea to use taxonomy and configure your taxonomies as post type. But even if you agree with that, 1200 post for cities and 30000 posts for streets would be too much and filter is obviously going to be broken.
As I acknowledged, there is no such feature available and whatever you want to build would be custom programming which is beyond the scope of our support policy. If you require help for custom programming, you can always contact our certified partners:
=> https://toolset.com/contractors/
I’ve created many times such dependencies with taxonomies. Each “location” post type is connected to one city taxonomy and one street taxonomy. In the search form I choose “show only available options” and then when I choose a city I only get the streets of locations related to that city.
I’ve created many times such dependencies with taxonomies. Each “location” post type is connected to one city taxonomy and one street taxonomy. In the search form I choose “show only available options” and then when I choose a city I only get the streets of locations related to that city.
==>
That is not actual dependent dropdowns. We say dependent dropdowns when you select a city, the street dropdown should only display related results that belongs to selected city.
Using option “show only available options” - It will display only terms for the available posts but that option will have even more performance impact compare to normal dropdown. You have too many terms thats the issue.