wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



block_template_part › WordPress Function

Seit5.9.0
Veraltetn/v
block_template_part ( $part )
Parameter:
  • (string) $part The block template part to print. Either 'header' or 'footer'.
    Erforderlich: Ja
Definiert in:
Codex:

Prints a block template part.



Quellcode

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 );
}