WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


I would like them to be like this:


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

share|improve this question
up vote 0 down vote accepted

I managed to find a way to fix this by toying with my Custom Post Type and Taxonomy registrations.

In register_post_type properties:

'rewrite' => array( 'slug' => 'classes' ),

In register_taxonomy properties:

'rewrite' => array( 'slug' => 'classes', 'with_front'=> false ),

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 and http://site.com/classes/languages/french/ points to the post template

share|improve this answer

I 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.

share|improve this answer
Hi Hiroshi, like I mentioned, I was able to achieve this with simple configuration. In the plugin options, I set the classes strcuture to /%class_categories%/%postname%/. Then in the registration parameters, I set the rewrite parameters as described above. DM me on Twitter @seb2point0 if you would like more info on how I did this. – Sebastien Jul 10 '13 at 7:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.