The What
Syntax
register_post_type( string $post_type_key, array|string $configuration_arguments = array() );
Description
This construct (function) registers a post type. WordPress uses classifies different types of posts. The built-in post types are Posts (post
, Pages (page
), Attachments (attachment
, Revisions (revision
, and Navigation Menu Items (nav_menu_item
). You are able to extend WordPress by defining and registering your own custom post type.
Make sure you do not use these post type keys, as they are reserved within WordPress core:
- action
- author
- order
- theme
Parameters
post_type_key
- The key or slug which identifies the new post type.
configuration_arguments
- Configuration arguments for the post type. These define the characteristics of the specified post type for its labels and behavior.
Return Values
This function does not return anything.
Whoever says that coding is hard, just smack them.
More coming soon…keep checking back.