jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

[Feature Request] Improve preload for archives

Open stodorovic opened this issue 6 years ago • 2 comments

List of page types which aren't included in preload:

  • Post type archive page
  • Author archive page
  • Woocommerce product category/tag
  • Sub-pages of all archives

I'll think over about more details. For now, I'm just opening Feature Request.

stodorovic avatar Sep 02 '17 11:09 stodorovic

Quick workaround for woocommerce product categories/tags:

add_filter( 'wp_cache_preload_taxonomies', 'my_wpsc_preload_taxonomies' );

function my_wpsc_preload_taxonomies( $taxes ) {
        return array_merge( $taxes, array( 'product_tag' => 'product_tag', 'product_cat' => 'product_cat' ) );
}

stodorovic avatar Nov 29 '17 12:11 stodorovic

this code should be inserted in the page wp-cache-config.php? thanks

fzulianello avatar May 08 '19 04:05 fzulianello