diff --git a/packages/block-library/src/archive-title/index.php b/packages/block-library/src/archive-title/index.php index 76a3012f6f4959..972915baa621ca 100644 --- a/packages/block-library/src/archive-title/index.php +++ b/packages/block-library/src/archive-title/index.php @@ -19,7 +19,7 @@ function render_block_core_archive_title( $attributes, $content, $block ) { return ''; } - $tag_name = isset( $attributes['level'] ) ? 'h' . $attributes['level'] : 'h2'; + $tag_name = isset( $attributes['level'] ) ? 'h' . (int) $attributes['level'] : 'h2'; $align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}"; $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );