[wp-testers] custom post type permalinks

Otto otto at ottodestruct.com
Tue May 18 18:00:20 UTC 2010

On Tue, May 18, 2010 at 12:53 PM, Otto <otto at ottodestruct.com> wrote:
> "Custom Post Types" are NOT "Posts". Think of them more like Pages.
> They're more like Custom Content Types, really.

Oh, with all that said, if you just want the year in the slug, it might work.

array ( 'slug' => '/podcast/%year%' )

Note that just using '%year%' would very much NOT work. There must be
some URL prefix difference between a "post" and your custom type...
That URL difference is necessary for the rewrite system to know the
difference in what to look for.

Basically, if I gave it a URL of "/2010/some-name", then the rewrite
system needs to figure out, just from that text and the rewrite rules
alone, what post type to look for in the database.


More information about the wp-testers mailing list