Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 857 Bytes

File metadata and controls

32 lines (19 loc) · 857 Bytes

wp types posttype create

Creates a new post type.

OPTIONS

[--slug=<string>] : The name of the post type. Default: random string.

[--singular=<string>] : The singular name of the post type. Default: random string.

[--plural=<string>] : The plural name of the post type. Default: random string.

[--editor=<string>] : Which editor to use. Can take values: classic, block. Default: classic.

[--show_in_rest=<bool>] : Whether show_in_rest option is enabled. Default: false.

[--hierarchical=<bool>] : Whether hierarchical option is enabled. Default: false.

[--publicly_queryable=<bool>] : Whether publicly_queryable option is enabled. Default: true.

EXAMPLES

wp types posttype create --slug='book' --singular='Book' --plural='Books' --editor=block --show_in_rest=true --hierarchical=true