How to check during “pre_get_posts” if WP performing default query for specific custom template?
As you describe the timing would not quite work. During WP core load: main query is created and processed into query variables (with pre_get_posts being one of the hooks able to influence the results) then template-loader.php uses conditionals (dependent on those query variables) to determine template to use So at the point of pre_get_posts you … Read more