0

my title appears as home-title, I'm trying to remove but it's not working code in header.php is

<head>
    <title><?php wp_title('|', true, 'right'); ?></title>
    <meta charset="<?php bloginfo( 'charset' );?>" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php
    wp_head(); /** we hook up in wp_booster @see td_wp_booster_functions::hook_wp_head */
    ?>
</head>
4

Usage of wp_title() is not recommended anymore. Instead, you can add the title-tag support to your theme, so WordPress can automatically build and output the proper title for you. Here's how to do it:

add_action( 'after_setup_theme', 'wpse302145_add_title_tag' );
function wpse302145_add_title_tag() {
    add_theme_support( 'title-tag' );
}

This piece of code goes in your theme/child-theme's functions.php file. You can safely remove the <title><?php wp_title('|', true, 'right'); ?></title> line from the theme's header now.

| improve this answer | |
  • problem not fixed – Vivek Bulan Apr 28 '18 at 8:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.