Today i will show how you can use your custom WordPress query by simply using the hook pre_get_posts. This is an interesting hook that can modify the query before execution. As a result you can alter the WordPress query results aka the posts that come up to your blog.
There are several options to do this. Whether you want to limit the number of posts shown per page for example, or to include/exclude specific categories. You can also exclude or even order sticky posts chronologically.
All these gave me some interesting ideas on how to modify the WordPress query and experiment with the homepage. [Read more…] about Custom WordPress Query With pre_get_posts