The default frontend URLs in WordPress are either posts, pages, or built-in templates such as archive pages. So far, we've used shortcodes inside posts or pages to display custom features. In complex applications, adding features through shortcodes within pages is not recommended. In such a case, modifying the page or mistakenly deleting the page can result in the breakdown of the site's functionality. So, we need to enable custom screens by using custom routes.
Routing is the process of matching a URL to a specific resource or template. The default process matches existing URL structures to templates in the theme. WordPress provides a built-in Rewrite API for allowing plugin and theme developers to define custom rewrite rules and provide additional functionality.
In this recipe, we are going to use the existing features of the Rewrite API with...