get_page_templates


get_page_templates ( $post = null, $post_type = 'page' )

Parameters:
  • (WP_Post|null) $post Optional. The post being edited, provided for context.
  • (string) $post_type Optional. Post type to get the templates for. Default 'page'.
Returns:
  • (array) Key is the template name, value is the filename of the template
Defined at:
Change Log:
  • 4: .

Description

Get the Page Templates available in this theme

Related Functions

get_page_template, get_paged_template, get_page_template_slug, get_tag_template, get_date_template

Top Google Results

User discussions

wpseek mobile