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

Possible Duplicate:
custom post types, wp_get_archives and add_rewrite_rule

I have a custom post type called "course" and I would like to create a date based archive similar to the default post archives which look like mysite.com/2012/05.

I want to use urls like mysite.com/course/2012/05.

How can I do this using the WordPress rewrite API? While avoiding plugins.

This solution is very close How to give a CPT (custom post type) a date based url but I would like to avoid using a query var if possible and stick with the year/month based urls.

share|improve this question

marked as duplicate by toscho May 8 '12 at 23:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 1 down vote accepted

Had similar situation not long ago. Check the answer to my question here. I believe that will solve your problem.

share|improve this answer

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