Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 120088

Julian on "[Plugin: Quick Cache ( Speed Without Compromise )] Prevent random posts load for being cached"

$
0
0

Hey,

my posts are randomly loaded at my home.php. But not with that plugin. How can I exclude it for being cached?
Function is:

// Random posts load
function random_home_posts($query) {
   if($query->is_main_query()){
      if ($query->is_home()) {
        $query->set('orderby', 'rand');
      }
    }

};
add_action('pre_get_posts','random_home_posts');

http://wordpress.org/extend/plugins/quick-cache/


Viewing all articles
Browse latest Browse all 120088

Trending Articles