Used By
Used By | Description |
---|---|
wp-includes/post.php: register_post_type() | Registers a post type. |
Fires after a post type is registered.
(string) Post type.
(WP_Post_Type) Arguments used to register the post type.
We can register a custom post type with the register_post_type function. This should not be hooked before init. So, the good option is to call it with an init hook.
Post types can support any number of built-in core features such as meta boxes, custom fields, post thumbnails, post statuses, comments, and more. See the $supports the argument for a complete list of supported features.
File: wp-includes/post.php
Version | Description |
---|---|
4.6.0 | Converted the $post_type parameter to accept a WP_Post_Type object. |
3.3.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/registered_post_type