Prevent random posts load for being cached
-
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');
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Prevent random posts load for being cached’ is closed to new replies.