public function get( $args, $assoc_args ) {
		$post = $this->fetcher->get_check( $args[0] );

		$post_arr = get_object_vars( $post );
		unset( $post_arr['filter'] );

		if ( empty( $assoc_args['fields'] ) ) {
			$assoc_args['fields'] = array_keys( $post_arr );
		}

		$formatter = $this->get_formatter( $assoc_args );
		$formatter->display_item( $post_arr );
	}
public function get( $args, $assoc_args ) {
		$post = $this->fetcher->get_check( $args[0] );

		$post_arr = get_object_vars( $post );
		unset( $post_arr['filter'] );

		if ( empty( $assoc_args['fields'] ) ) {
			$assoc_args['fields'] = array_keys( $post_arr );
		}

		$formatter = $this->get_formatter( $assoc_args );
		$formatter->display_item( $post_arr );
	}
public function get ( $ args , $ assoc_args ) { $ post = $ this -> fetcher -> get_check ( $ args [ 0 ] ) ; $ post_arr = get_object_vars ( $ post ) ; unset ( $ post_arr [ 'filter' ] ) ; if ( empty ( $ assoc_args [ 'fields' ] ) ) { $ assoc_args [ 'fields' ] = array_keys ( $ post_arr ) ; } $ formatter = $ this -> get_formatter ( $ assoc_args ) ; $ formatter -> display_item ( $ post_arr ) ; }
Gets details about a post.

## OPTIONS

<id>
: The ID of the post to get.

[--field=<field>]
: Instead of returning the whole post, returns the value of a single field.

[--fields=<fields>]
: Limit the output to specific fields. Defaults to all fields.

[--format=<format>]
: Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- yaml
---

## EXAMPLES

# Save the post content to a file
$ wp post get 123 --field=content > file.txt
Gets details about a post .