If you use the Advanced Custom Fields plugin (ACF) to create your custom taxonomy for your custom post type then you can just check the box to make it hierarchical. It will then automatically create a url structure matching the hierarchy.
Related Posts:
- Rewrite Slug for CPT Archive Pages to Plural Name of Slug
- Change author base slug for different roles
- Custom Permalinks for Blog Posts Only
- Detect page type by url (Archive, single, page, author,…)
- Using a page template without a page
- How to seamlessly redirect between different archive and singular slugs?
- Why does wordpress still strip my query var?
- When to call `add_rewrite_rule` for safety
- URL rewrites and pagination
- Rewrite rules goes away
- Rewrite Rule for Post “Subpage”, with pagination
- Remove child category from URL
- Rewrite rule for admin-ajax.php
- Change WordPress comments url / word
- Cache issues with redis and nginx
- Rewrite WordPress Custom URL
- WordPress removes spaces in URL on pagination
- Adding more pages to author pages
- How to check current URL for endpoint in a template file?
- add_rewrite_rule not working for language specific characters
- Custom rewrite rule
- Is it possible to remove feeds from rewrites?
- WordPress .htaccess – route other URLs to another app
- Rewrite URL – insert custom variables as a directory path
- URL endpoint with HTML
- Can’t add external rewrites
- Can I have /blog and /foo and /bar all point to the same blog?
- Monkey Man Rewrite Analyzer says my rule will trigger but it doesn’t [closed]
- Append a value to a certain page’s URL before page load
- How do I retain url parameters the entire time a user browses my site?
- Different URL rewrite rules loading the same page
- Cannot access wp-admin without trailing slash – .htaccess configuration for WordPress behind a nginx proxy
- Wildcard forward all posts and pages with few exceptions
- WordPress author url to alias domain url? domain.com/author/{username}/
- Replace specific middle part of url
- Remove Category slug from link
- URL rewriting not working
- Rewriting a subdomain page on one WordPress installation to a parent domain on another
- How to redirect large amount of URLs?
- How to achieve my custom post url structure?
- How to create a front end user profile with a friendly permalink and a 404 trigger
- Rewrite URL for single category
- Help with rewrite rules for two post types
- Pretty URLs and rewrite
- Understanding the query string after .htaccess rewrite
- Rewrites rules disappear after a while
- How to get default permalink link text?
- Using WP Rewrite to rewrite custom urls in this scenario
- Localize URL bases
- Pass parameters to static home page brings up index.php latest posts
- How can i ensure that SQL statements are not displayed if an enduser types the wrong variable name in the URL
- How to redirect Webp files?
- Create rewrite rule for subpage
- WordPress simple Url Rewrite
- ubuntu + nginx – everything works except “rewrite url structure” [closed]
- Rewriting in wordpress url
- Add pagination to a template loaded by query variable
- Proper way to set up rewrite with Wp
- Add rel=canonical to only one page
- Why is a rewrite rule in wordpress prevent pagination?
- Using custom url parameters in a page
- Rewrite custom taxonomy slug – but only parent items
- get variable from url?
- Rewrite parameters as Url for SEO
- Home page url rewriting WordPress
- Changing the wordpress default search url to something like – …example.com/search?query=keyword
- Custom post type rewrite with categories and static pages
- Custom folder with PDF files (not in WP Library) – Create url for each file
- WordPress is adding “category” word before my actual category name in url (and this is unsolicited)
- WP returns to domain root instead of siteurl
- SEF add_rewrite_rule & add_rewrite_tag not working
- Rewrite WordPress Url from root to subfolder without moving files
- Problem building an url with argument
- How do I rewrite URL that has custom parameter
- WordPress address url option missing under general setting
- Rewrite rule for post as a child of a CPT
- URL Rewrite and Archive Template Files – Post Type vs. Taxonomy
- Which url points to which file
- Post & Page with same slug
- Rewrite CPT permalinks to subdomains
- Need help adding rewrite rules to page
- variable endpoints for webservice
- Make URL like /fr/something display same as /something
- How to retrive previous Domain URL in Wp
- URL Rewrite when WordPress is in subdirectory
- Rewrite rule is catching pages not posts
- Migration from old CMS to WordPress 301 redirection rules?
- How to change the url?
- How to change blog category, author URL in wordpress
- Using add_rewrite_tag to create urls for page sections
- URL Variables in a Certain Page
- Can I exclude a single URL from a rewrite plugin?
- 404 for index.php
- How to stop WordPress from replacing plus (+) characters from URL on the front page?
- Rewrite URLs in a Custom Post Type with Multiple Taxonomies
- Rewrite rule giving 404 error
- Using .htaccess to redirect /da/ to / in URL
- WordPress picks a wrong template if ?cat= is used as URL parameter
- How to disable WordPress canonical redirect to nearest matching URL and force 404 Page?
- Is it possible to use the same slug structure for a taxonomy and for some pages?