add pre_get_posts in function.php (including bugs)