Fixed title not show on tab browser.

In WordPress 4.3 or higher not support show tagline and title in settings -> general , But I’ll guide you fixed that.
Step 1 : Add this code in files header.php in your theme and below tag open <head>

<title><?php wp_title('|', true, 'right'); ?></title> 

Step 2 : Open file functions.php in your theme and close code

add_theme_support( 'title-tag' );  

Step 3 : Open file functions.php in your theme and add this code

function custom_wp_title( $title, $sep ) {
global $paged, $page;

if ( is_feed() ) {
return $title;
}

// Add the site name.
$title .= get_bloginfo( 'name', 'display' );

// Add the site description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) ) {
$title = "$title $sep $site_description";
}

// Add a page number if necessary.
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
}

return $title;
}
add_filter( 'wp_title', 'custom_wp_title', 10, 2 );

Thank you !

Leave a Reply

Your email address will not be published. Required fields are marked *