locate_block_template


locate_block_template ( $template, $type, $templates )

Parameters:
  • (string) template Path to the template. See locate_template().
  • (string) type Sanitized filename without extension.
  • (array) templates A list of template candidates, in descending order of priority.
Returns:
  • (string) The path to the Full Site Editing template canvas file, or the fallback PHP template.
Defined at:

Description

Find a block template with equal or higher specificity than a given PHP template file.Internally, this communicates the block content that needs to be used by the template canvas through a global variable.

Related Functions

locate_template, get_block_template, get_block_templates, resolve_block_template, get_the_block_template_html

Top Google Results

User discussions

wpseek mobile