is_attachment


is_attachment ( $attachment = '' )

Parameters:
  • (int|string|int[]|string[]) attachment Optional. Attachment ID, title, slug, or array of such to check against. Default empty.
Returns:
  • (bool) Whether the query is for an existing attachment page.
Defined at:

Description

Determines whether the query is for an existing attachment page.For more information on this and similar theme functions, check out the {@link Conditional Tags} article in the Theme Developer Handbook.

Related Functions

is_local_attachment, wp_insert_attachment, wp_attachment_is, _fix_attachment_links, prepend_attachment

Top Google Results

User discussions

wpseek mobile