so this randomization will not work for 1 post * */ function randomize_post_output_CIPF($query) { PLGNTLS_class::debug_infos(2); $posts_per_page = $query->get('posts_per_page'); if (is_null($posts_per_page)) { return; } if ($posts_per_page >= -1) { return; } PLGNTLS_class::debug_infos(); error_log("posts_per_page: " . json_encode($posts_per_page)); $query->set('orderby', 'rand'); } add_action('pre_get_posts', 'randomize_post_output_CIPF'); ?>