• Hi,

    On my page i set to preload all files and also checked a checkbox “Preload tags, categories and other taxonomies.” I see that page mydomain.com/category/no-category/ is cached, but my custom taxonomy isnt.

    I have a taxonomy product-type with these terms: standard, large, small

    I want to preload mydomain.com/product-type/standard/ archive pages, but it does not do it automatically like it does with default wp categories.

    I have to manually open these arcxhives to create a cache what is not okay in my case. Is it possible to enable automatic preloading custom taxonomy archives?

    Thanks

    https://www.ads-software.com/plugins/wp-super-cache/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I have the same issue – pages for custom taxonomies are not cached when cache preloading occurs (manual or scheduled).

    Did did find a solution (other than visiting each page yourself)?

    Let me elaborate on this for the plugin author. ?? Custom taxonomies are added to the term_taxonomy table. Once the name is known you would find the slug just like you do for a tag.

    For example, my site has a custom taxonomy of city, and a url for such a page (the one that is not currently cached) is: example.com/city/city-or-florence/

    The Yoast SEO plugin lets one customize SEO settings for custom taxonomies on the Titles & Metas page | Taxonomies tab, in case that is helpful. I’d include a screen grab, but I don’t know how to attach it.

    I’d be glad to provide mode information if that would help with this feature. Thanks!

    Looking at the plugin, I saw this line in the preload code:

    $taxonomies = apply_filters( 'wp_cache_preload_taxonomies', array( 'post_tag' => 'tag', 'category' => 'category' ) );

    So I added a filter in my child theme’s functions.php:

    // WP SuperCache custom taxonomies
    add_filter( 'wp_cache_preload_taxonomies', 'cache_my_taxonomies' );
    function cache_my_taxonomies( $tax ) {
        return  array( 'post_tag' => 'tag', 'city' => 'city', 'county' => 'county'  ) ;
    }

    Now my site’s city and county custom taxonomies are cached. Yey! I do not want categories cached, that’s why 'category' => 'category' is not in the array in my filter.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Preload taxonomy archives’ is closed to new replies.