In case you need to modify $wp_query object for some reason it’s good idea to use “pre_get_posts” filter. Maybe it will sound better if I say that you can easily intercept $wp_query before any results are returned. I guess you wonder how that can be so useful but – believe it or not – possibilities READ MORE