wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



block_template_part › WordPress Function

Od5.9.0
Przestarzałyn/a
block_template_part ( $part )
Parametry:
  • (string) $part The block template part to print. Either 'header' or 'footer'.
    Wymagane: Tak
Zdefiniowane na:
Codex:

Prints a block template part.



Źródło

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