I’m trying to do exactly what wordpress already does with posts and categories. I’m very close to having this working but I’m running in to a wall here. It seems to me that this should be a standard feature and this is critical to full functionality of custom post types.
I have created a custom post type called ‘requests’ that has a custom taxonomy ‘request-categories’. I’ve created a template with a modified loop that allows me to view my custom post type in a certain ‘request-category’ for instance ‘electronics-requests’.
The loop works if I manually change the args for post type and taxonomy but, in order for it to be usable, I need to figure out how to deal with the urls so that
mysite.com/requests/request-category/electronics-requestwill modify the loop in such a way that will provide the expected results.
The way I see it,
mysite.com/requestswill be an actual page, while the
electronics-requestportions of the url would be assigned to the appropriate variables in the loop. Which seems easy enough but I don’t know how to keep wordpress from 404ing.
Does anyone with more knowledge about how WP handles urls have any suggestions?
- The topic ‘Url mapping – modified loop to sort custom post types by taxonomy’ is closed to new replies.