WP_Rewrite Isn’t As Scary As You Think

Everyone wants pretty URLs on their sites, and WordPress provides a powerful system to support this. Behind the magic of the Permalinks settings page is WP_Rewrite, an API terrifying to many developers.

Like most of WordPress, the Rewrites system isn’t limited just to internal use, and understanding how the API works lets developers build powerful tools atop the platform. We’ll start by discussing what happens when you set a permalink structure through the dashboard and how WordPress uses that to query for content. We’ll then explore how you can add custom rewrite rules, both with and without an understanding of regular expressions. By the end of this session, you’ll know what actions and filters are available to tweak rewrite rules, how endpoints enhance your code, and how you can leverage this powerful API to deliver a better user experience.