How to modify this function to exclude also the post belonging to a specific category?
pre_get_posts and WP_Query uses the exact same parameters, so if you need to know which parameters you can use with pre_get_posts, simply visit the WP_Query page in the codex. There is another trick which you can use to get all the parameters (query_vars) you can use. Just add this on the page that you need … Read more