_get_block_template_file ( $template_type, $slug )

  • private
  • (string) template_type Template type. Either 'wp_template' or 'wp_template_part'.
  • (string) slug Template slug.
  • (array|null) { Array with template metadata if $template_type is one of 'wp_template' or 'wp_template_part', null otherwise. @type string $slug Template slug. @type string $path Template file path. @type string $theme Theme slug. @type string $type Template type. @type string $area Template area. Only for 'wp_template_part'. @type string $title Optional. Template title. @type string[] $postTypes Optional. List of post types that the template supports. Only for 'wp_template'. }
Defined at:


Retrieves the template file from the theme for a given slug.

Related Functions

_get_block_templates_files, get_block_template, get_block_templates, _get_block_templates_paths, get_the_block_template_html

Top Google Results

User discussions

wpseek mobile