get_block_file_template


get_block_file_template ( $id, $template_type = 'wp_template' )

Parameters:
  • (string) id Template unique identifier (example: 'theme_slug//template_slug').
  • (string) template_type Optional. Template type. Either 'wp_template' or 'wp_template_part'. Default 'wp_template'.
Returns:
  • (WP_Block_Template|null) The found block template, or null if there isn't one.
Defined at:

Description

Retrieves a unified template object based on a theme file.This is a fallback of get_block_template(), used when no templates are found in the database.

Related Functions

get_block_template, get_block_templates, _get_block_template_file, get_single_template, get_home_template

Top Google Results

User discussions

wpseek mobile