diff --git a/lib/template-loader.php b/lib/template-loader.php index 76d594fe45b83..43aa362d148c2 100644 --- a/lib/template-loader.php +++ b/lib/template-loader.php @@ -90,10 +90,13 @@ function gutenberg_override_query_template( $template, $type, array $templates = $_wp_current_template_content = empty( $current_template_post->post_content ) ? __( 'Empty template.', 'gutenberg' ) : $current_template_post->post_content; } - // Add extra hooks for template canvas. + // Add hooks for template canvas. + // Add viewport meta tag. add_action( 'wp_head', 'gutenberg_viewport_meta_tag', 0 ); - remove_action( 'wp_head', '_wp_render_title_tag', 1 ); - add_action( 'wp_head', 'gutenberg_render_title_tag', 1 ); + + // Render title tag with content, regardless of whether theme has title-tag support. + remove_action( 'wp_head', '_wp_render_title_tag', 1 ); // Remove conditional title tag rendering... + add_action( 'wp_head', 'gutenberg_render_title_tag', 1 ); // ...and make it unconditional. // This file will be included instead of the theme's template file. return gutenberg_dir_path() . 'lib/template-canvas.php';