wp post-type get
Gets details about a registered post type.
Synopsis
wp post-type get <post-type> [--field=<field>] [--fields=<fields>] [--format=<format>]
Options
Post type slug.
[–field=
Instead of returning the whole taxonomy, returns the value of a single field.
[–fields=
Limit the output to specific fields. Defaults to all fields.
[–format=
Render output in a particular format.
- default: table
- options: table, csv, json, yaml
Available Fields
Default fields:
- name
- label
- description
- hierarchical
- public
- capability_type
- labels
- cap
- supports
Optional fields:
- count
Examples
# Get details about the 'page' post type
$ wp post-type get page --fields=name,label,hierarchical --format=json
{"name":"page","label":"Pages","hierarchical":true}