[wp-hackers] Double Slug - Custom Post Type

Ryan Duff ryanduff.list at gmail.com
Sat Mar 12 17:27:06 UTC 2011

On 3/10/11 2:36 PM, Robert Lusby wrote:
> Hello,
> I have a Custom Post type, I'd like to sit at:
> http://example.com/some-page/custom-post-slug
>   http://example.com/some-page/custom-post-slug/a-custom-post-item
> E.g. have a "double" slug, on the Custom Post type (So the custom post type
> becomes a second level item in the URL, not top level).
> 'rewrite' =>  array(
>          'slug' =>  'custom-post-slug',
>          'with_front' =>  false);
> I can't use with_front, as our "front" is /blog/ (for the blog area).
> How are people achieving this?
> Thanks,
> Rob

Did you flush your rewrite rules after changing that?

I have posts showing up under /news  (using custom structure 

I created an Events post type and set the slug to 'events' and it works 
fine. It shows up as /events/post-slug

Maybe you're missing something when setting up your post type. Here's a 
paste of what I used:


Also see this article: 

Hope this helps

Ryan Duff

More information about the wp-hackers mailing list