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 am working on a site where they want to break up the content into custom post types (right now everything is broken up by post categories) but they want to be able to save their URLs to preserve inbound links and Facebook Likes. They currently have a date-based URL structure (example.com/2013/01/11/the-post-name) and they want to keep that but still use custom post types.

I've seen plugins that will allow me to easily append the date before the post title in the URL, but nothing that removes the slug from the first URI segment. I tried to add a rewrite rule to remove the slug (rewrite => array( 'slug' => '' )) but that resulted in 404s.

What's the best way to go about this? I know it's bad practice to remove the slug, but the client is pretty adamant about it.

share|improve this question

You can't. Permalink rewrite rules are a set of patterns that the URI is matched against. If they all share the same pattern, one will always take precedence, so you will only have a single post type that will not 404. Categories (or some other taxonomy) is the way to differentiate content that shares the same URL structure.

share|improve this answer

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.