get_post_format( int|object|null $post = null )
Retrieve the format slug for a post
(int|object|null) (Optional) Post ID or post object. Defaults to the current post in the loop.
Default value: null
(string|false) The format if successful. False otherwise.
More Information More Information
This will usually be called in the the loop, but can be used anywhere if a post ID is provided.
The set of currently defined formats are:
Note also that the default format (i.e., a normal post) returns false, but this is also referred in some places as the ‘standard’ format. In some cases, developers may wish to do something like the following to maintain consistency: