WordPress.org

Ready to get started?Download WordPress

Forums

Title not appearing in browser title bar, only in header (4 posts)

  1. Horsegal
    Member
    Posted 2 years ago #

    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?

  2. peredur
    Member
    Posted 2 years ago #

    A link to your site would help us to see what's going on.

    Cheers

    PAE

  3. Horsegal
    Member
    Posted 2 years ago #

  4. peredur
    Member
    Posted 2 years ago #

    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:

    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fadultwebcamjobs.co.cc%2F

    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:

    <title><?php
    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 ) );
    ?></title>

    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.

    HTH

    PAE

Topic Closed

This topic has been closed to new replies.

About this Topic