i’m using wordpress 4.6
i’d like to remove just the title tag automatically outputted by wordpress because need to hardcode the html title tag in the template.
i guess is something like this:
add_action('wp_head', '//remove title tag command');
but i didn’t find any valid solution so far.
4 Answers
You can see everything added to wp_head
in the file /wp-includes/default-filters.php
.
If your theme supports the title tag, you can remove it entirely with remove_action
:
remove_action( 'wp_head', '_wp_render_title_tag', 1 );
Though it may be simpler/better to use remove_theme_support( 'title-tag' )
in a child theme, which is what _wp_render_title_tag
checks before outputting the title tag.