wp post-type list
Lists registered post types.
Synopsis
bash
wp post-type list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>]Options
[–
[–field=
[–fields=
[–format=
- default: table
- options: table, csv, json, count, yaml
Available Fields
Default fields:
- name
- label
- description
- hierarchical
- public
- capability_type
Optional fields:
- count
Examples
bash
# List registered post types
$ wp post-type list --format=csv
name,label,description,hierarchical,public,capability_type
post,Posts,,,1,post
page,Pages,,1,1,page
attachment,Media,,,1,post
revision,Revisions,,,,post
nav_menu_item,"Navigation Menu Items",,,,post
# List post types with 'post' capability type
$ wp post-type list --capability_type=post --fields=name,public
+---------------+--------+
| name | public |
+---------------+--------+
| post | 1 |
| attachment | 1 |
| revision | |
| nav_menu_item | |
+---------------+--------+