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'm trying to build a new WordPress theme using register_post_type to create a custom post type called listings.

I would like each listing to have the following permalink structure:


I'm not quite sure how to achieve this with the CPT controls listed in the Codex. Previously, I have a achieved a similar effect by creating a custom structure in Permalink Settings:


It has been suggested on the main forum that I use wp_rewrite, but wp_rewrite only seems to deal with incoming requests and does not change the way CPT posts are created.

To illustrate further with an image, I want to change the /listings/ part of the permalink URL to the post author's name. See image below.

alt text

share|improve this question
up vote 3 down vote accepted

My plugin Custom Post Permalinks allows you to set permalink structures for custom post types and it supports post authors as part of a permastruct. However, while my plugin will enable you to set up that structure, I don't suggest using that structure. That structure will essentially make WordPress interpret all top-level pages as 404 errors (and second level pages, I think). You should be fine if you add the post type to anchor the beginning of the structure like this:

share|improve this answer
Cool, thanks. I'll check that out. – jnthnclrk Oct 21 '10 at 21:19
Cool plugin, works great! – jnthnclrk Oct 22 '10 at 12:31
I followed your advice and accepted the need to maintain the initial /%post_type%/ section. But am now thinking it would be nice to add a /blog/ section to my non-custom post types for consistency. – jnthnclrk Oct 22 '10 at 12:56

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.