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 have a custom post type with a custom URL structure so it works like:


Now I have multiple authors of these posts, so I want to enable an "Author Archive" for only these custom post types at urls like this:


Is this possible? Any ideas?


UPDATE: @Milo points out (I believe correctly) that "WordPress wouldn't be able to discern what is a post title and what is an author name," so given that, how would I get URLs like http://domain.com/custom-post-type/author/authorname1 ? Thanks!

share|improve this question
WordPress wouldn't be able to discern what is a post title and what is an author name. It would work if you gave it a unique prefix, like: http://domain.com/custom-post-type/author/authorname1 – Milo Jan 25 '13 at 3:49
Understood. How do you do that? (I'll modify the question ... ) – GavinR Jan 25 '13 at 4:15
See my answer below. – Milo Jan 25 '13 at 5:36
up vote 2 down vote accepted

Change custom-post-type in the following to the name of your CPT, both the slug and post_type= in the query vars. Visit your Permalinks Settings page to flush rewrite rules. You could also put this in a plugin and flush rules on plugin activation.

function wpa83047_author_rewrite_rule(){
add_action( 'init', 'wpa83047_author_rewrite_rule' );
share|improve this answer
That works great! THANKS! – GavinR Jan 26 '13 at 21:03

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.