Support » Themes and Templates » Title not appearing in browser title bar, only in header

  • I have searched the internet for a solution to my issue, but have not found anything that works. My page titles appear just above the logo in the header of every page of my site. It does not appear in the title bar of the browser (all browsers).

    I have installed the SEO Ultimate plug-in as it was suggested somewhere, while it allows me to modify the description and title it does nothing to help my problem. I have tried the following code and it does do anything, it is what I have in there now.

    [code moderated – please use the pastebin for any code over 10 lines]

    I also tried this code, that came with the theme and nothing works.

    <title><?php if (is_home () ) { bloginfo('name'); }elseif ( is_category() ) { single_cat_title(); echo ' - ' ; bloginfo('name'); }
    elseif (is_single() ) { single_post_title();}
    elseif (is_page() ) { bloginfo('name'); echo ': '; single_post_title();}
    else { wp_title('',true); } ?></title>

    I am not sure what else to do. Can anyone help me?

Viewing 3 replies - 1 through 3 (of 3 total)
  • A link to your site would help us to see what’s going on.



    The title in the <head> section of your HTML is all over the place. In particular this is not going to work:

    <meta <title="" content="Copyright (c)2012" name="copyright">

    In fact your front page has 50 errors and 26 warnings in its HTML:

    The first thing you need to do is to sort out the HTML. If you still can’t get it to work, post the code for the <title> tag in your header.php file. It’s just a few lines and so should not be moderated. for examle, in twentyten, you find something like this:

    global $page, $paged;
    wp_title( '|', true, 'right' );
    bloginfo( 'name' );
    $site_description = get_bloginfo( 'description', 'display' );
    if ( $site_description && ( is_home() || is_front_page() ) )
      echo " | $site_description";
    if ( $paged >= 2 || $page >= 2 )
      echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );

    Your theme should do something similar. If you don’t know what the calls to the WP functions do, you can look them up in the Codex.



Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Title not appearing in browser title bar, only in header’ is closed to new replies.