diff --git a/packages/block-library/src/archives/index.php b/packages/block-library/src/archives/index.php index 04e7e4957cb3a..7010b3b6a080e 100644 --- a/packages/block-library/src/archives/index.php +++ b/packages/block-library/src/archives/index.php @@ -88,16 +88,17 @@ function render_block_core_archives( $attributes ) { $classnames = esc_attr( $class ); + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classnames ) ); + if ( empty( $archives ) ) { return sprintf( - '
%2$s
', - $classnames, + '
%2$s
', + $wrapper_attributes, __( 'No archives to show.' ) ); } - $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classnames ) ); return sprintf( '',