• Resolved Nazmul Hossain Nihal

    (@nazmulhossainnihal)


    My theme header file has this code :

    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <?php if(is_home()): ?>
    <title><?php echo get_bloginfo("blogname"); ?> ? <?php echo get_bloginfo("description"); ?></title>
    <?php else: ?>
    <title><?php wp_title('?',true,"right"); ?> </title>
    <?php endif; ?>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="profile" href="https://gmpg.org/xfn/11">
    <link rel="stylesheet" href="<?php echo get_template_directory_uri().'/'; ?>bootstrap/css/bootstrap.min.css" />
    <script src="<?php echo get_template_directory_uri().'/'; ?>jquery.js"></script>
    <script src="<?php echo get_template_directory_uri().'/'; ?>bootstrap/js/bootstrap.js"></script>
    <script src="<?php echo get_template_directory_uri().'/'; ?>menu.js"></script>
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    
    <?php wp_head(); ?>
    </head>

    and it’s producing this : (title tag twice)

    <head>
    <meta charset="UTF-8">
    <title>SuperbCodes ? Personal Blog of Nazmul Hossain Nihal</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="profile" href="https://gmpg.org/xfn/11">
    <link rel="stylesheet" href="https://www.superbcodes.com/wp-content/themes/superbcodes/bootstrap/css/bootstrap.min.css" />
    <script src="https://www.superbcodes.com/wp-content/themes/superbcodes/jquery.js"></script>
    <script src="https://www.superbcodes.com/wp-content/themes/superbcodes/bootstrap/js/bootstrap.js"></script>
    <script src="https://www.superbcodes.com/wp-content/themes/superbcodes/menu.js"></script>
    <link rel="pingback" href="https://www.superbcodes.com/xmlrpc.php">
    
    <title>SuperbCodes | Personal Blog of Nazmul Hossain Nihal</title>

    What can I do now?

Viewing 1 replies (of 1 total)
  • There’s probably a function in your theme’s functions.php that’s hooked onto wp_head() that’s outputting the second <title> tag. What theme are you using?

Viewing 1 replies (of 1 total)
  • The topic ‘Showing twice’ is closed to new replies.