One or more args to pass to WP_Query.
+* `--fields`=<fields>:
+
+ Limit the output to specific object fields. Defaults to ID,post_title,post_name,post_date.
+
* `--format`=<format>:
Output list as table, CSV, JSON, or simply IDs. Defaults to table.
wp post list --format=ids
wp post list --post_type=post --posts_per_page=5 --format=json
+
+ wp post list --post_type=page --fields=post_title,post_status
## OPTIONS
+* `--fields`=<fields>:
+
+ Limit the output to specific object fields. Defaults to name,role.
+
* `--format`=<format>:
Output list as table, CSV or JSON. Defaults to table.
## EXAMPLES
- wp role list
+ wp role list --fields=role --format=csv
List terms of a given taxonomy.
+* `--fields`=<fields>:
+
+ Limit the output to specific object fields. Defaults to all of the term object fields.
+
* `--format`=<format>:
Output list as table, CSV, JSON, or simply IDs. Defaults to table.
## EXAMPLES
- wp term list category --format=csv
\ No newline at end of file
+ wp term list category --format=csv
+
+ wp term list post_tag --fields=name,slug
Only display users with a certain role.
+* `--fields`=<fields>:
+
+ Limit the output to specific object fields. Defaults to ID,user_login,display_name,user_email,user_registered,roles
+
* `--format`=<format>:
Output list as table, CSV, JSON, or simply IDs. Defaults to table.
wp user list --format=ids
wp user list --role=administrator --format=csv
+
+ wp user list --fields=display_name,user_email
\fBwp\-post\-list\fR \- Get a list of posts\.
.
.SH "SYNOPSIS"
-wp post list [\-\-\fIfield\fR=\fIvalue\fR] [\-\-format=\fIformat\fR]
+wp post list [\-\-\fIfield\fR=\fIvalue\fR] [\-\-fields=\fIfields\fR] [\-\-format=\fIformat\fR]
.
.SH "OPTIONS"
.
One or more args to pass to WP_Query\.
.
.TP
+\fB\-\-fields\fR=\fIfields\fR:
+.
+.IP
+Limit the output to specific object fields\. Defaults to ID,post_title,post_name,post_date\.
+.
+.TP
\fB\-\-format\fR=\fIformat\fR:
.
.IP
wp post list \-\-format=ids
wp post list \-\-post_type=post \-\-posts_per_page=5 \-\-format=json
+
+wp post list \-\-post_type=page \-\-fields=post_title,post_status
.
.fi
\fBwp\-role\-list\fR \- List all roles\.
.
.SH "SYNOPSIS"
-wp role list [\-\-format=\fIformat\fR]
+wp role list [\-\-fields=\fIfields\fR] [\-\-format=\fIformat\fR]
.
.SH "OPTIONS"
.
.TP
+\fB\-\-fields\fR=\fIfields\fR:
+.
+.IP
+Limit the output to specific object fields\. Defaults to name,role\.
+.
+.TP
\fB\-\-format\fR=\fIformat\fR:
.
.IP
.
.nf
-wp role list
+wp role list \-\-fields=role \-\-format=csv
.
.fi
\fBwp\-term\-list\fR \- List terms in a taxonomy\.
.
.SH "SYNOPSIS"
-wp term list \fItaxonomy\fR [\-\-format=\fIformat\fR]
+wp term list \fItaxonomy\fR [\-\-fields=\fIfields\fR] [\-\-format=\fIformat\fR]
.
.SH "OPTIONS"
.
List terms of a given taxonomy\.
.
.TP
+\fB\-\-fields\fR=\fIfields\fR:
+.
+.IP
+Limit the output to specific object fields\. Defaults to all of the term object fields\.
+.
+.TP
\fB\-\-format\fR=\fIformat\fR:
.
.IP
.nf
wp term list category \-\-format=csv
+
+wp term list post_tag \-\-fields=name,slug
.
.fi
\fBwp\-user\-list\fR \- List users\.
.
.SH "SYNOPSIS"
-wp user list [\-\-role=\fIrole\fR] [\-\-format=\fIformat\fR]
+wp user list [\-\-role=\fIrole\fR] [\-\-fields=\fIfields\fR] [\-\-format=\fIformat\fR]
.
.SH "OPTIONS"
.
Only display users with a certain role\.
.
.TP
+\fB\-\-fields\fR=\fIfields\fR:
+.
+.IP
+Limit the output to specific object fields\. Defaults to ID,user_login,display_name,user_email,user_registered,roles
+.
+.TP
\fB\-\-format\fR=\fIformat\fR:
.
.IP
wp user list \-\-format=ids
wp user list \-\-role=administrator \-\-format=csv
+
+wp user list \-\-fields=display_name,user_email
.
.fi