[wp-testers] new custom post types - problem viewing new custom post
John Blackbourn
johnbillion+wp at gmail.com
Fri Apr 30 00:16:23 UTC 2010
On Fri, Apr 30, 2010 at 12:55 AM, Danny G Smith <dgs at riskiii.com> wrote:
> Is there a WordPress function that I could put at the end of my script so that it would do it automatically
You'll want this:
global $wp_rewrite;
$wp_rewrite->flush_rules();
The best place to flush the rules is probably when your plugin is
activated (but after it registers the custom post type of course).
John
More information about the wp-testers
mailing list