is_singular ( $post_types = '' )

  • (string|string[]) post_types Optional. Post type or array of post types to check against. Default empty.
  • (bool) Whether the query is for an existing single post or any of the given post types.
Defined at:


Determines whether the query is for an existing single post of any post type (post, attachment, page, custom post types).If the $post_types parameter is specified, this function will additionally check if the query is for one of the Posts Types specified. For more information on this and similar theme functions, check out the {@link Conditional Tags} article in the Theme Developer Handbook.

Related Functions

is_single, is_search, is_ssl, is_main_query, is_year

Top Google Results

User discussions

wpseek mobile