Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have spent days now trying to figure this out, StackOverflow is my last resort. All I want is the following:

http://www.mydomain.com/my-post-stype/my-top-level-category/my-sub-level-category/my-page.html

For posts this is insane easy, just adding /%category%/%postname%.html as a permalink does the trick. However for custom post type this seems insane tough.

I have a registered post_type project. And a taxonomy project_category

Now I like my permalinks to turn out as

/project - Overview of projects in all categories.
/project/CATEGORY - Overview of projects within that category.
/project/CATEGORY/SUBCATEGORY - Overview of projects within that subcategory.
/project/CATEGORY/SUBCATEGORY/postname - The actual post.

Probably wp_rewrite needs to help me out here tho I have no clue how. Can anyone help me out?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I've just gotten my head around Doing something similar. This is adapted from this tutorial

  1. For your post type registration make sure that query_var, publicly_queryable, and has_archive are set to true and rewrite is set to false.
  2. Next up is the code here.

Edit: sorry, but code hinting is completely not working for me today. Code is in above link

share|improve this answer
    
Thank you for helping me. –  Mark Sep 19 '11 at 22:10
    
No prob. If any help is needing understanding anything for future reference, ask away. –  Manny Fleurmond Sep 19 '11 at 23:54
    
It did, however, not solve the entire question I am going to repost this going into more details. –  Mark Sep 20 '11 at 11:04
    
What didn't it solve? –  Manny Fleurmond Sep 20 '11 at 13:04
add comment

Your Answer

 
discard

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.