H::register_post_type( $post_type, [$args] )
$post_type (string) - Unique name of the post type. Example: "product", "event". Don't use these reserved name.
$args (array - optional) - Available arguments are:
menu_icon (string) - Icon names are listed here - Default is "dashicons-admin-post".
slug (string) - The URL base of this CPT - Default is derived from $name.
$name
menu_position (int) - The position in Sidebar - Default is 30 (below Comments).
supports (array) - Additional feature. Available values are:
Create "PRODUCT" post type
H::register_post_type('product' , [ 'menu_icon' => 'dashicons-cart', 'slug' => 'p', 'supports' => ['comments', 'revisions'] ] );
There was an error while loading. Please reload this page.