Setting up custom post type archives in WP3.1? Any luck?

I asked the question too soon. And thanks to @Jan Fabry for pointing me in the right direction.

In case anyone else has this problem, here’s the answer.

Any time the rewrite rules are changed (adding a new post type, changing the slug or the has_archive slug, etc.) you have to call flush_rewrite_rules once. It has to be called after the post types are registered. I put it at the very end of my function which registered the post types on ‘init’, visited the site once, then deleted it out. Now the site works fine.

Leave a Comment