SO, I'm having an issue where I need to rewrite a hierarchical custom post type. The custom post type is called "Destinations" and it hold regions, countries, and holidays. There is already content on the site so I can't redo this functionality.
The current structure goes 4 levels deep:
- /destinations/{region}/{country}/{holiday}/
Each level has it own design type.
What I need is:
- {region}/
- {region}/{country}/
- {country}/{holiday}/
Destinations is completely removed from the URL and the URL level are restricted to 2 levels.
Is there anyway of doing this within WordPress?
request
andparse_request
actions in source and their surrounding code.