August 19, 2016
Rewrite rules are how WordPress creates clean/pretty URIs from URL query parameters. When your new page or blog post automatically gets a human-friendly URL, this is provided by a rewrite rule, which itself is using WordPress’s Rewrite API. In this presentation Jonathan Daggerhart will go over the basics of the Rewrite API, create a few new rewrite rules as examples, and make use of the data the Rewrite API provides the global WP_Query object when it matches a rule’s pattern. Hopefully by the end of the class, you’ll have a good understanding of what the Rewrite API is, how it works, and some use-cases where it could be beneficial.