0

Very basic question, but I couldn't find an answer.

I am using the WP CLI post get command: https://wp-cli.org/commands/post/get/

One of the option is [--field=], but I can't find in the doc the list of allowed values for this field.

What am I missing?

  • Note that you need --fields=, not --field, and they can be comma separated. – William Turrell Apr 10 '18 at 15:39
2

The list of fields is available on the wp post list page.

These fields will be displayed by default for each post:

ID
post_title
post_name
post_date
post_status

These fields are optionally available:

post_author
post_date_gmt
post_content
post_excerpt
comment_status
ping_status
post_password
to_ping
pinged
post_modified
post_modified_gmt
post_content_filtered
post_parent
guid
menu_order
post_type
post_mime_type
comment_count
filter
url

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.