get_block_template


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

Parameters:
  • (string) id Template unique identifier (example: theme_slug//template_slug).
  • (string) template_type Optional. The template type (post type). Default 'wp_template'.
Returns:
  • (WP_Block_Template|null) Template.
Defined at:

Description

Retrieves a single unified template object using its id.

Related Functions

get_block_templates, locate_block_template, get_home_template, resolve_block_template, get_template

Top Google Results

User discussions

wpseek mobile