Core Function
View Source on Trac ↗ get_page_template_slug()
get_page_template_slug( mixed $post = null ) Gets the specific template filename for a given post.
Parameters 1 required
| Name / Type | Description |
|---|---|
| (int | | WP_Post) $post Optional. Post ID or WP_Post object. Default is global $post. Required |
Return Value
((string)
(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.
Function Information
Since Version
3.4.0
Source File
wp-includes/post-template.php
Advertisement