has_post_format


has_post_format ( $format = array(), $post = null )

Parameters:
  • (string|string[]) format Optional. The format or formats to check. Default empty array.
  • (WP_Post|int|null) post Optional. The post to check. Defaults to the current post in the loop.
Returns:
  • (bool) True if the post has any of the given formats (or any format, if no format specified), false otherwise.
Defined at:

Description

Check if a post has any of the given formats, or any format.

Related Functions

set_post_format, get_post_format, _post_format_link, has_post_parent, _post_format_request

Top Google Results

User discussions

wpseek mobile