Permalinks: both pages and custom post type in same "subfolder"
-
I’m currently developing a site that according to the specification from the SEO expert involved should combine pages and custom posts in the same folder URL wise.
So we have the Car custom post type and we want to access a specific car (DeLorean) at the url awesumcars.com/cars/delorean.
We also have pages about car technology etc. and they should also be located under cars. So if we have an article about time traveling cars it should end up at awesumcars.com/cars/time-traveling-cars.
What’s the best way to accomplish this?
One possibility that I see would be to add cars and cars/time-traveling-cars as pages and make some kind of rewrite that tries to fetch a car with thatprovided slug if we don’t match a page in the cars folder, but I’m not sure about how to accomplish that.
- The topic ‘Permalinks: both pages and custom post type in same "subfolder"’ is closed to new replies.