• i use the zeesynergie template zee and WordPress SEO by Yoast Plugin for my german site (jetzt-kuendigen.de) and i am quite happy with both but unfortunately it happens that the title appears twice in header like

    “blog-title” – “site or page title” | “blog title”

    .

    I want the first blog title to disappear, but since i am not much of a coder i need a little help. i dont want to ruin my header.php so could someone please tell me what part of this code i have to change?

    <head>
    	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    
    	<title><?php bloginfo('name'); if(is_home() || is_front_page()) { echo ' - '; bloginfo('description'); } else { wp_title(); } ?></title>
    
    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    <?php wp_head(); ?>
    </head>
Viewing 3 replies - 1 through 3 (of 3 total)
  • change the one line to:

    <title> if(is_home() || is_front_page()) { echo ' - '; bloginfo('description'); } else { wp_title(); } ?></title>

    or, if you want to fully rely on the seo plugin, simply:

    <title><?php wp_title(); ?></title>
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    With Yoast Plugin, doesn’t the title need to be wp_title('')?

    Thread Starter ismailrrr

    (@ismailrrr)

    thanks for your quick response! second code was what i was looking for! thanks a lot

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘title in header showing off twice’ is closed to new replies.