Customizing the WordPress Query with pre_get_posts

One of the most powerful features of WordPress is the WP Query. Here’s how to control it with the pre_get_posts hook.