SearchForecast Marketplace

Create Clean Title Tag for your WordPress Posts

Posted by: dragonblogger  //  Category: SEO

One of the easiest things you can do is define a clear and simple Title tag for all of your Blog Posts and implementing this in your Header.php file. You will often want to override whatever theme default is being set and in many cases by doing this manually you can avoid the overhead of adding another WordPress plug-in that just adds a custom title tag to your blog post. The ‘Title’ tag is the name that your post displays at the top of the browser when the page is visited, and it also is the “Title” of your article that gets picked up and displayed on Google Search engines:

Typically what you want to do is keep your title clean, any blog themes will have || or >> characters as part of the Title tag which don’t translate well and provide no SEO value, they also interfere with your ability to submit your articles cleanly to sites like BlogEngage, Digg or other directories.

I decided to make my own custom Title tag in my blogs and simply use this line of text inserted into my Header.php after the <head> tag:

<title><?php if ( is_single() ) { echo wp_title(“”,true) . ‘ on ‘ . get_bloginfo(‘name’); } else { echo get_bloginfo(‘name’) . ‘ for ‘ . get_bloginfo(‘description’); } ?></title>

What the above code will do is set your Title tag to just be your “post title” if it is  apost, and if it is  your homepage or archive, search or any other page, it will use your blog name for <blog description>

so for DragonBlogger.com you can see my title for my homepage becomes:
Dragon Blogger for Blogging Tips, Technology news, with Movie Reviews and Entertainment posts mixed in for fun.

and my posts themselves have a title of just the “post name” on “Dragon Blogger”

I like having my blog name/handle in the title of all posts so users who search for articles can see my identity and handle in the title, or else they may not easily know which site the article is located on.  This is a matter of preference but in my opinion you should make it as easy as possible to identify which site or who the article is attributed to on Google search results.

This code is easily modified and you can use it for just about any blog theme, just remember to backup your existing header.php first and then replace your original <title> tag in your theme with this tag above.  You can tailor it if you need to, but this is a good alternative to using a WordPress plug-in.

-Dragon Blogger

Related posts:

  1. Video Demonstration: Optimizing Your WordPress Posts for SEO Video demonstration to walk you through how to use All in One SEO Pack and Google Adwords to find and...
  2. How Much Value Does SEO Plugin For WordPress Get You? Meta Keywords is not considered by Google Search when listing pages on search results, this means blogs should not be...
  3. Great Methods To Create Backlinks for Your Blog or Website Great article on Wordstream by Ken Lyons on how to create amazing backlinks for your blog or website. ...
  4. WordPress Plugin: Dashboard Pending Review – Keep Track of Guest Posts I highly recommend this Dashboard Pending Review plug-in if you run a contributor blog where you approve posts that are...
  5. Tips to Clean Up Your Blog Here are some helpful tips anyone can apply to clean up their blog for best presentation....


If you enjoyed this post, subscribe to DragonBlogger.com
via FaceBook, Twitter, RSS or Email
or
Enter your email and subscribe now!
Email:

Written by dragonblogger (1110 Articles Published)

Working in the IT Industry for over 10 years and specializing in web based technologies. Dragon Blogger has unique insights and opinions to how the internet and web technology works. An Avid movie fan, video game fan and fan of trying anything and everything new.

Follow dragonblogger on Twitter @dragonblogger

Tags: , , , , , , , , ,

17 Responses to “Create Clean Title Tag for your WordPress Posts”

  1. AJ (11 comments) Says:

    Great post. The title tag SOOO important to SEO efforts (probably the most important on page factor). I create post titles that reflect the keywords that are important to me and use these as my page title as well.

    [Reply]

  2. Tek3D (9 comments) Says:

    This feature is included in Platinum SEO so I don’t have to modify the code. I often use my Title tag like this: “clean title – my blog name”, is the dash OK or I should change it to a word?
    Tek3D´s last blog ..Google Analytics Tracking Code UpdatedMy ComLuv Profile

    [Reply]

    dragonblogger (1957 comments) Reply:

    Dash is fine, I haven’t seen it truncated, but definitely don’t use or | or ‘ in the Page Title as those characters are “script” triggers and can cause breaks in various web applications.

    [Reply]

    Tek3D (9 comments) Reply:

    Oh now I understand why my title was truncated when I use “” in the title. Thanks for your post and response.
    Tek3D´s last blog ..Optimize website with Page SpeedMy ComLuv Profile

    [Reply]

  3. Massage listings (1 comments) Says:

    I was trying to make a tag for every post title in certain category.

    Means:

    All the posts that fall under Cat: A — will have this following title:
    “[A] Post Title 1″
    “[A] Post Title 2″

    I tried to add

    <?php if (is_category('catnumberhere')) {
    [CAT TAG]

    } ?>

    [Reply]

    dragonblogger (1957 comments) Reply:

    I don’t recommend using the same title for all posts in the same category, they would have trouble indexing on Google which for searching is best to have a unique title per post.

    [Reply]

    Alvin Lim (4 comments) Reply:

    Will Google penalize blog with repeating same title keyword phrase? Is it better to put it in URL for SEO purpose?

    Such as these title “iPhone App – nice app” and “iPhone App for Business – Download it for office use”
    Alvin Lim´s last blog ..iPhone Apps Game – Black And White ChessMy ComLuv Profile

    [Reply]

    dragonblogger (1957 comments) Reply:

    I don’t know if Google Penalizes, I just know when your site is indexed for Google I don’t think its a good think to have the same TITLE for every post in a category. I think it hurts your chances of getting your page indexed. If someone knows more detail I would love to hear it.

  4. Kervin Vergara (1 comments) Says:

    I recommend to all beginners in the SEO using the All In One SEO plugin for WordPress because it is the best and automates all these operations work philosophy that often tend to be tedious. Greetings!
    Kervin Vergara´s last blog ..Protect Me!: Protect files and folders with a password has never been easierMy ComLuv Profile

    [Reply]

    dragonblogger (1957 comments) Reply:

    I use the All in One SEO Pack myself, the only thing is many hosting providers complain about the amount of Memory it utilizes, I have had many blame it for causing blog to use lots of RAM/CPU. It does add some overhead.

    [Reply]

  5. Mike Jones (7 comments) Says:

    I use AllInOne SEO, as well, and I get what I think is the right combination of Post title | Blog Title. I’m happy with that unless anyone thinks otherwise?
    Mike Jones´s last blog ..Fashion Hippies Part 1My ComLuv Profile

    [Reply]

  6. Rohit Sane from Tech Freak (3 comments) Says:

    All in one SEO plugin does this work for me. But I am planning to stop using plugins like AIOSEO and using PHP codes as they reduce the loading time of the page. Thanks for this one!
    Rohit Sane@ Tech Freak´s last blog ..10 Cool ways to Jazz up your LaptopMy ComLuv Profile

    [Reply]

  7. John Soares from Productivity Techniques (1 comments) Says:

    I’ll pay more attention to the title tags on my posts. They’re important for SEO and enticing readers.

    I’ve used All In One SEO in the past, but now all my blogs run on Thesis, which has SEO capabilities built in.
    John Soares @ Productivity Techniques´s last blog ..Resolved- Coffee Increases Productivity…My ComLuv Profile

    [Reply]

    dragonblogger (1957 comments) Reply:

    By default AIO doesn’t set the Title you have to check mark the option int he settings, but ultimately using a theme with SEO built in may have performance advantages (or not) if the theme is poorly coded.

    [Reply]

  8. Kathy (5 comments) Says:

    I like having my blog name in the title along with the actual post title. I think it serves to help brand the site better. If I was building a niche site though for the specific purpose of organic search engine traffic then I absolutely would remove the extra blog name from all titles.
    Kathy´s last blog ..Should You Use No Follow Tags For Comments On Your BlogMy ComLuv Profile

    [Reply]

  9. Kimi from VideoTutorialWordpress (3 comments) Says:

    Intesting code, might try later on my test blog, i have heard there is a plugin how to clean this post url, however because i try to decrease plugin usage, this code seems to be useful.
    Kimi@VideoTutorialWordpress´s last blog ..Change Twenty Ten’s background- WordPressMy ComLuv Profile

    [Reply]

    dragonblogger (1957 comments) Reply:

    I try to do with as few plugins as possible to.

    [Reply]

Leave a Reply

CommentLuv Enabled

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.

Comments links could be nofollow free.