get_page_template_slug


get_page_template_slug ( $post = null )

Parameters:
  • (int|WP_Post) post Optional. Post ID or WP_Post object. Default is global $post.
Returns:
  • (string|false) Page template filename. Returns an empty string when the default page template is in use. Returns false if the post does not exist.
Defined at:
Change Log:
  • 4: .

Description

Gets the specific template filename for a given post.

Related Functions

get_page_templates, get_page_template, get_paged_template, get_tag_template, get_date_template

Top Google Results

User discussions

wpseek mobile