WordPress.org

Forums

[resolved] Modifying the <title> (5 posts)

  1. WiBu
    Member
    Posted 8 years ago #

    I'm trying to modify the <title> in the header to display the post title before the site stuff and I'm also trying to get rid of the annoying >> thing.

    I've been unable to find where it's generated and this unable to change it. Any help?

  2. Chris_K
    Member
    Posted 8 years ago #

  3. WiBu
    Member
    Posted 8 years ago #

    Lots of thanks for the help (again!).

    I've found what I need and am now using this code:

    <title>
    <?php wp_title(''); ?>
    <?php if(wp_title('', false)) { echo ' : '; } ?>
    <?php bloginfo('name'); ?>
    </title>

    Which gives me a title of "Page Title : Blog Title" on all sub pages and "Blog Title" on the index.

  4. devilmaycry
    Member
    Posted 8 years ago #

    From an SEO point of view; something like this might be more beneficial in my opinion. However, it is also just my preference.

    <title><?php if(is_home()) { echo bloginfo('name'); } else wp_title(''); ?></title>

  5. WiBu
    Member
    Posted 8 years ago #

    I both agree and disagree with your SEO point above. I agree that having the title of the post first is benificial but sometimes having the site name/URL at the end can also be benificial depending on the keywords in the URL.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.