Skip to content

Super Speedy Search settings page is slow to load or times out, or there are too many meta keys on the SSS settings page

One thing that happens in the Super Speedy Search settings page is we figure out what unique post_meta keys you have. If you have a huge wp_postmeta table then this may cause the settings page to timeout.

Some users may have thousands of meta_keys and it may be tricky to actually navigate through the entire list.

In both of these cases, you can bypass our SELECT DISTINCT meta_key query by telling us in your functions.php file which meta keys to show. We do cache the result of this SELECT DISTINCT query, but if you are running regular imports your cache may be getting wiped, or your timeout settings may be so low that it doesn’t get a chance to cache the result in the first place. Or you may just want to restrict how many meta keys to show to have a cleaner interface.

Choose your meta keys for Super Speedy Search settings in your functions.php

In your child theme functions.php file, add the following code:

add_filter('pre_sss_meta_keys', function() {
    return ['_sku', 'external_image'];
});

In this example above, from now on only the _sku and external_image meta_keys will be displayed as selectable options in the Super Speedy Search settings page. Add whichever meta_keys you wish to this array and these will be displayed on the Meta Search tab of our settings page.

This filter does not force these meta keys to be used, it just affects which meta keys are displayed on the settings page – i.e. you still need to visit the settings page and select the meta keys you wish to see.

Did this article answer your question?

Leave a Reply

Your email address will not be published. Required fields are marked *


CYBERFUNDAY 40% discount coupon extended to Friday 9th December + join our Discord community and read the rules for an extra 20% discount coupon.