Skip Navigation

[Gelöst] too many taxonomies crash site

This support ticket is created vor 3 Jahre, 3 Monate. 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.

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 8 Antworten, has 2 Stimmen.

Last updated by Ido Angel vor 3 Jahre, 3 Monate.

Assisted by: Minesh.

Author
Artikel
#1897907

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

#1898333

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

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.
=> hidden link

If you do not know how to do it, you may contact certified programmer who can implement such custom integration for you.

#1898391

Thx Minesh!
I' try the autocomplete option. As for now, I'm trying this shortcode to make the taxonomy a textbox:

[wpv-control-post-taxonomy taxonomy="city" type="textfield" default_label="-- בחר עיר --" url_param="wpv-city"]

But that doesn't seem to work. What's the right format?
Thanks!
Ido

#1898393

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

As I already acknowledge that:

I think of only option to setup a taxonomy filter as textbox but natively textbox for taxonomy filter is not supported.

So, you should add the direct html input to the search form. For example:

<div class="form-group">
		<input type="text" name="tax-city-search" class="form-control search-autocomplete" placeholder="Search">
	</div>
#1898421

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):

hidden 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?

#1898505

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

You have two taxonomy cities and street.

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.

Dependent dropdowns filter would be only possible when you setup cities and street as post types and create one to many post-relationship between them and then add the post relationship filter. Please check the following Doc for more info:
=> https://toolset.com/documentation/legacy-features/views-plugin/how-to-filter-by-related-posts/

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/

#1898555

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.

#1898581

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

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.

#1898591

Ok, thanks. I'll try to get around this without toolset.

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