Trying to come up with a solution to a permalink puzzle I’m working on. Hoping someone can see something I’m not or have some ideas.
I’ve got a site abz.com. We’ve got a custom post type ‘Books‘ with a slug of ‘books‘. One of the taxonomies associated with books is ‘Publisher‘ (using slug publisher). What I would like is to be able to list the books, filtered out by a specific publisher from the taxonomy. I can accomplish this right now by doing:
But what I would really like is to have a pretty URL structure like:
(which currently results in a 404). I thought I could accomplish this by using add_rewrite_endpoint() but that doesn’t seem to be working (and yes, I made sure to call flush_rewrite_rules()). I’ve also looked into post_link filter, but that seems to be a bit too specific. I’ve got several custom post types with taxonomies where I need to do the same thing, so what I’m really after is somehow setting up the entire site so that I can use
And I want wordpress to match this request to the archive-$posttype.php template file.
I’m confident this can’t be that difficult to accomplish and that I must be overlooking some piece of the documentation/API. Any ideas?