WordPress.org

Ready to get started?Download WordPress

Forums

Switching Blog Title with Post Title (7 posts)

  1. hitboy
    Member
    Posted 6 years ago #

    Currently my blog shows my titles like so...

    Blog title | post title
    or
    Blog title | Tag Line

    I want it to be like

    Post title | Blog title
    and
    Tag Line | Blog Title

    my site is http://www.hpkmedia.com how do i do this?

  2. richarduk
    Member
    Posted 6 years ago #

    I'm guessing your theme has something like this in header.php or single.php

    <title><?php bloginfo('name'); ?> | <?php wp_title(); ?></title>

    Swap them round:
    <title><?php wp_title(); ?> | <?php bloginfo('name'); ?> </title>

    Better still, get Headspace 2 from Urban Giraffe which allows you to type in the <title> </title> that you want as you write the post. Search Engines and humans want different titles - humans want eye-catching tabloid stuff, search engines want literal stuff

  3. markdw
    Member
    Posted 6 years ago #

    You should find the following code in your header.php file inside your themes folder.

    <title><?php bloginfo('name'); ?><?php wp_title();?></title>

    Simply swap the php functions around so it reads

    <title><?php wp_title(); ?><?php bloginfo('name')?></title>

    This should swap them around.

  4. hitboy
    Member
    Posted 6 years ago #

    Ok tried what you guys said but on my main page http://articles.hpkmedia.com/ it doesn't include the tagline... only the blog title..

    Also for the posts for example like this one http://articles.hpkmedia.com/writing/attract-more-readers-than-most-best-selling-authors.html

    it puts a >> at the beginning how do I get rid of the ">>"

    Thanks for the help!

  5. hitboy
    Member
    Posted 6 years ago #

    I did some more messing around with it and still cant figure it out..

  6. Chris_K
    Member
    Posted 6 years ago #

    It would be pretty helpful for you to show what you have in header.php between the <title> tags.

  7. richarduk
    Member
    Posted 6 years ago #

    <?php wp_title(''); ?> will remove the double arrows

    As a multiple post page, there's no post title. If you mean description by 'tag line' then use <?php bloginfo('description'); ?>

    Really, for the index.php template you should hardcode your <title></title> in as so many people link to the home page and you want it to rank in the SEs e.g. <title>Internet marketing with pizzaz! HPKMedia blah blah blah </title>

    :-)

Topic Closed

This topic has been closed to new replies.

About this Topic