Answer the question
In order to leave comments, you need to log in
How to beat wordpress loading speed with multiple taxonomies?
Hello. I ran into a problem when there are a lot of taxonomies in the system (I have more than 1000 of them), the site speed dropped by ~3 seconds (they were taken from woocommerce, because in it global attributes are created by separate taxonomies pa_attr1, pa_attr_2, ... pa_attrN, and taxonomies are registered on almost every back- and front-end page, i.e. woo does in wp-content/plugins/woocommerce/includes/class-wc-post-types.php (209)
$attribute_taxonomies = wc_get_attribute_taxonomies();
foreach ( $attribute_taxonomies as $tax ) {
register_taxonomy( $name, apply_filters( "woocommerce_taxonomy_objects_{$name}", array( 'product' ) ), apply_filters( "woocommerce_taxonomy_args_{$name}", $taxonomy_data ) );
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question