Skip to content

Commit

Permalink
Codex Header: Don't output a <title> tag. See #62.
Browse files Browse the repository at this point in the history
  • Loading branch information
dd32 committed Jan 13, 2022
1 parent 82f2f1b commit dc1f342
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mu-plugins/blocks/global-header-footer/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ function rest_render_codex_global_header( $request ) {
// hreflang tags are not needed for this site.
remove_action( 'wp_head', 'WordPressdotorg\Theme\hreflang_link_attributes' );

// Remove <title> tags.
remove_theme_support( 'title-tag' );

$markup = rest_render_global_header( $request );
$markup = preg_replace( '!<html[^>]+>!i', '<!-- [codex head html] -->', $markup );

Expand Down

0 comments on commit dc1f342

Please sign in to comment.