wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



block_template_part › WordPress Function

Depuis5.9.0
Dépréciéen/a
block_template_part ( $part )
Paramètres:
  • (string) $part The block template part to print. Either 'header' or 'footer'.
    Requis: Oui
Défini(e) dans:
Codex:

Prints a block template part.



Source

function block_template_part( $part ) {
	$template_part = get_block_template( get_stylesheet() . '//' . $part, 'wp_template_part' );
	if ( ! $template_part || empty( $template_part->content ) ) {
		return;
	}
	echo do_blocks( $template_part->content );
}