is_page_template


is_page_template ( $template = '' )

Parameters:
  • (string|array) $template The specific template name or array of templates to match.
Returns:
  • (bool) True on success, false on failure.
Defined at:
Change Log:
  • 4: .
  • 4: .

Description

Determines whether currently in a page template.

This template tag allows you to determine if you are in a page template. You can optionally provide a template name or array of template names and then the check will be specific to that template.

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

get_page_template, get_paged_template, get_page_templates, get_template, get_page_template_slug

Top Google Results

User discussions

wpseek mobile