diff --git a/themes/wporg-translate-events-2024/blocks/pages/events/event-details/index.php b/themes/wporg-translate-events-2024/blocks/pages/events/event-details/index.php index 0dec2808..1a084784 100644 --- a/themes/wporg-translate-events-2024/blocks/pages/events/event-details/index.php +++ b/themes/wporg-translate-events-2024/blocks/pages/events/event-details/index.php @@ -28,10 +28,11 @@ function ( $breadcrumbs ) use( $event ): array { return ''; } $attributes['event'] = $event; + $attributes['use_custom_page_title'] = true; render_page( __DIR__ . '/render.php', - '', + esc_html( $event->title() ), $attributes ); }, diff --git a/themes/wporg-translate-events-2024/functions.php b/themes/wporg-translate-events-2024/functions.php index 2bfb8d6e..77732530 100644 --- a/themes/wporg-translate-events-2024/functions.php +++ b/themes/wporg-translate-events-2024/functions.php @@ -178,7 +178,7 @@ function render_page( string $template_path, string $title, array $attributes ): require $template_path; $rendered_template = ob_get_clean(); $page_title = esc_html( $title ); - $page_title_block = ! empty( $page_title ) ? do_blocks( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + $page_title_block = ( empty( $attributes['use_custom_page_title'] ) ) ? do_blocks( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped <<