get_page_template_slug( int|WP_Post $post = null )

Get the specific template name for a given post.


25 related functions found for: get_page_template_slug

Top ↑

Related terms found for this post

TaxonomyTerms
wp-parser-related-wordsget, locat, location, page, post-template-php, post-typ, post-type, slug, templat, template, wp-includes
wp-parser-packageTemplate, WordPress
wp-parser-source-filewp-includes/post-template.php

Top ↑

Terms Used Terms Used

Terms used in the related posts query

  • get
  • locat
  • location
  • page
  • post-template-php
  • post-typ
  • post-type
  • slug
  • templat
  • template
  • Template
  • wp-includes
  • wp-includes/post-template.php

Top ↑

Description Description


Top ↑

Parameters Parameters

$post

(int|WP_Post) (Optional) Post ID or WP_Post object. Default is global $post.

Default value: null


Top ↑

Return Return

(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.


Top ↑

Source Source

File: wp-includes/post-template.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
4.7.0 Now works with any post type, not just pages.
3.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.