[wp-hackers] Double Slug - Custom Post Type
Becky Resler
becky.absolute at gmail.com
Fri Mar 11 13:13:09 UTC 2011
Rob -
I've done something similar for a recent project where I needed the slug
for the custom post type to be more than 1 level deep. I just set the
slug as that.
'rewrite' => array('slug' => 'some-page/custom-post-slug');
I even have one that is 5 levels deep. Now ... I'm not sure if this is
the proper thing to do, but it worked for us. :)
Becky Resler
Web Programmer | Absolute Marketing Group
218-284-1111 | www.absolutemg.com
Sign up for our newsletter, The Absolute Truth:
www.absolutemg.com/newsletter
On 3/10/2011 1: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
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list