• When I start Preload Now, the preload is starting with the very first post (oldest post) on my site instead of the most recent post (newest post).

    Settings:
    Refresh preloaded cache files every 1080 minutes.
    Preload 3105 posts
    checked – Preload mode (garbage collection only on legacy cache files. Recommended.)
    unchecked – Preload tags, categories and other taxonomies
    unchecked – Send me status emails when files are refreshed

    Where in the code can I fix this myself until an update is made?

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

Viewing 1 replies (of 1 total)
  • Thread Starter klint01

    (@klint01)

    I found the line, for those that need to correct it as well.

    if ( $wp_cache_preload_posts == 'all' || $c < $wp_cache_preload_posts ) {
    		$posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE ( post_type != 'revision' AND post_type != 'nav_menu_item' ) AND post_status = 'publish' ORDER BY ID ASC LIMIT $c, 100" );

    Change last line ASC to DESC.

    if ( $wp_cache_preload_posts == 'all' || $c < $wp_cache_preload_posts ) {
    		$posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE ( post_type != 'revision' AND post_type != 'nav_menu_item' ) AND post_status = 'publish' ORDER BY ID DESC LIMIT $c, 100" );
Viewing 1 replies (of 1 total)
  • The topic ‘PRELOAD is starting with First Post instead of Newest Post’ is closed to new replies.