I’ve found this great plugin Custom Post Type Permalinks by a Japenese developer which is awesome at generating hierarchical permalink structures for Custom Post Types. Only I’m having an issue which I cannot get around and am looking for a solution.
I have a custom post type classes
and a taxonomy classes_categories
(ex: languages, technology, sciences…)
The links generated by WordPress for the ‘classes_categories’ look like this:
http://site.com/classes/class_categories/languages/
I would like them to be like this:
http://site.com/classes/languages/
Strangely, both of the URL’s work but I would like WordPress to generate them without ‘class_categories’ in the URL.
I’m looking for a solution which would involve either plugin configuration, my taxonomy declaration parameters or perhaps a workaround with a hook or something (maybe parse the URL when they a being rewritten).
thank you
I managed to find a way to fix this by toying with my Custom Post Type and Taxonomy registrations.
In
register_post_type
properties:In
register_taxonomy
properties:I now have a clean structure where
http://site.com/classes/
points to the post type archive template,http://site.com/classes/languages/
points to the taxonomy archive template andhttp://site.com/classes/languages/french/
points to the post templateI am the author of Custom Post Permalinks.
The Permalink like
is impossible.
Because, /languages/ is unable to determine term_name or post_name.
Sorry.
But I want to achieve.