diff --git a/packages/block-library/src/navigation/edit.js b/packages/block-library/src/navigation/edit.js index 0f55e958e5b978..79e06d370460a2 100644 --- a/packages/block-library/src/navigation/edit.js +++ b/packages/block-library/src/navigation/edit.js @@ -46,6 +46,8 @@ const ALLOWED_BLOCKS = [ 'core/page-list', 'core/spacer', 'core/home-link', + 'core/site-title', + 'core/site-logo', ]; const LAYOUT = { diff --git a/packages/block-library/src/navigation/index.php b/packages/block-library/src/navigation/index.php index df93471feecbc6..68246111ffe0e4 100644 --- a/packages/block-library/src/navigation/index.php +++ b/packages/block-library/src/navigation/index.php @@ -256,15 +256,19 @@ function render_block_core_navigation( $attributes, $content, $block ) { $inner_blocks_html = ''; $is_list_open = false; foreach ( $inner_blocks as $inner_block ) { - if ( ( 'core/navigation-link' === $inner_block->name || 'core/home-link' === $inner_block->name ) && ! $is_list_open ) { + if ( ( 'core/navigation-link' === $inner_block->name || 'core/home-link' === $inner_block->name || 'core/site-title' === $inner_block->name || 'core/site-logo' === $inner_block->name ) && ! $is_list_open ) { $is_list_open = true; $inner_blocks_html .= '
'; } - $inner_blocks_html .= $inner_block->render(); + if ( 'core/site-title' === $inner_block->name || 'core/site-logo' === $inner_block->name ) { + $inner_blocks_html .= '