is_attachment


is_attachment ( $attachment = '' )

Parameters:
  • (int|string|array|object) $attachment Attachment ID, title, slug, or array of such.
Returns:
  • (bool)
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 https://developer.wordpress.org/themes/basics/conditional-tags/ Conditional Tags} article in the Theme Developer Handbook.

Related Functions

is_local_attachment, wp_insert_attachment, wp_attachment_is, prepend_attachment, _fix_attachment_links

Top Google Results

User discussions

wpseek mobile