Modifying the current query with pre_get_posts.md 528 B


title: Modifying the current query with pre_get_posts date: 2020-01-02 16:31:56 categories: [cms] tags: [wordpress]

authors: sedlav

Pre_get_posts is a hook "pre_get_posts" is a WordPress hook that allows you to modify the current query. Just a quick reminder: when you're visiting any page of a WordPress install, the system creates a query that depends on the url you're visiting. This is basically what the template hierarchy does.…

Link