[wp-hackers] Best practice for archives of custom post types

Alex Dunae alex at dunae.ca
Fri Feb 5 23:31:32 UTC 2010


On Feb 5, 1:31 pm, Michael Pretty <mpre... at voceconnect.com> wrote:

> I'm not positive, but I'm
> pretty sure that register_post_type only sets up a rewrite rule for
> /%post_type%/%post_name%/ and doesn't set one up that would allow an
> archive listing of the post_type.  So you would need to set this up
> yourself.

This is exactly where I was running into trouble.  I'd registered the
post_type but wasn't able to generate an index.  add_rewrite_rule
looks like it will do the trick perfectly.

Thank you both.

Alex



More information about the wp-hackers mailing list