[wp-hackers] Custom Post Type URL Rewrite
hendronix at gmail.com
Tue Oct 22 18:04:50 UTC 2013
I had to use the same setup for our Press Releases too. I don't know enough to figure out a better way around it. It works pretty cleanly though.
Eric A. Hendrix
308 McFadyen Drive
Hendronix at gmail.com
On Tue, Oct 22, 2013 at 1:06 PM, AJ Morris <ajmorris2002 at gmail.com> wrote:
> Hey all,
> I have a CPT that we use for press releases and I'd like the archive page to live under a page, eg. example.com/about-us/pressreleases.
> The problem I'm encountering is that the menu is just wp_list_pages(). I thought I'd be able to do something with 'rewrite' => array( 'slug' => 'about-us/pressreleases', 'with_front' => true)) like I did for single press releases, but that doesn't seem to work. It seems the only way I could get this to work is to create a page, and assign it a special template in which I have a custom query on it.
> Does that make sense? Is there a better way to go about it?
> Thanks in advance!
> AJ Morris
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers