How often do you need to register_post_type?

register_post_type needs to be called on every page load– init seems to be fine and is the hook used in the Codex sample. The post data itself is kept in the database, but the registration tells the PHP what to do with it. Most of the post type information– the $labels, the $args— are not kept in the database to my knowledge (though I would agree that there might be an argument for doing so), so without that registration code Core doesn’t really know about the post type.

You can pretty easily test this yourself by registering the type and then commenting the code.

Leave a Comment