diff --git a/blocks/library/latest-posts/index.php b/blocks/library/latest-posts/index.php index bb06d4b4fe5a5e..b391ac794496df 100644 --- a/blocks/library/latest-posts/index.php +++ b/blocks/library/latest-posts/index.php @@ -56,6 +56,10 @@ function render_block_core_latest_posts( $attributes ) { $class .= ' columns-' . $attributes['columns']; } + if ( isset( $attributes['className'] ) && ! empty( $attributes['className'] ) ) { + $class .= ' ' . $attributes['className']; + } + $block_content = sprintf( '', esc_attr( $class ), @@ -102,6 +106,9 @@ function register_block_core_latest_posts() { 'type' => 'string', 'default' => 'date', ), + 'className' => array( + 'type' => 'string', + ), ), 'render_callback' => 'render_block_core_latest_posts', ) );