Custom URL structures in WordPress

Possibility to create custom URL structure in WordPress is a very helpful feature, although not a lot of people are familiar with it and WP Rewrite API and how to use it. Most common scenario where we would need custom URL structure is to create endpoints for content related to multiple taxonomies or custom fields (eg. Let’s say we have post type ‘Speakers’ and 2 taxonomies – ‘type’ and ‘level’, and we want to create an endpoint like this: ‘/speakers/design/advanced’). Another example is migrating a site from another system to WordPress with 1000s URLs and mapping those URLs to resolve on the correct new endpoint (very important for SEO).

Speaker