[wp-hackers] Custom post type & hierarchical

Lox lox.dev at knc.nc
Sun Aug 22 11:50:40 UTC 2010

2010/8/22 Michael Clark <
dc153464a11bcf5aeb18180db28017fb.wp-hackers at planetmike.com>

> I added this code to the bottom of my function create_my_post_types() and
> all is good now.
>        global $wp_rewrite;
>        $wp_rewrite->flush_rules(false);

Do u call that function after right after register_post_type? If so it means
it get called on every page request witch is not good, I think.

I personally "flush_rules" only when I change the rewrite slug and it works.

Best regards.

lox.dev at knc.nc

More information about the wp-hackers mailing list