How to remove blog name from single blog post title in WordPress

by admin on February 10, 2009


For SEO purposes it is very important that you optimize your blog post titles because titles are very important for search engine optimization. if your WordPress blog name contains many of your keywords and if your blog name appears in the title of all your blog posts it may be considered as spam by search engines.  You need to customize your template in such a manner that only your post title appears within the title tags and not the post title plus the blog name.

You can use one of the conditional tags to decide what sort of title your WordPress blog is going to use and you can use these conditional tags in header.php. Using a conditional tag first you determine whether it is your homepage on a single blog post or page.  You can use the following code:

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

This way the blog name only appears within the  title tag when the visitors are viewing your homepage, otherwise just the title of the blog post or the page is published within the title tag.

These days some people prefer to set the particular blog page as their homepage or the front page. for instance if you are using WordPress as a content management system to publish a regular website then you don’t want your homepage to look like a collection of blog posts.  The recent versions of WordPress allow you to create a page and then set this page as your front page.  When you do that the function is_home() does not work.  In case of such a situation arises you should use is_front_page() instead.

  • Stumbleupon
  • Delicious
Share

Related posts

{ 6 comments… read them below or add one }

Jeff Paul Scam March 10, 2009 at 11:02 pm

Hi, I read your post and found it a very interesting. I run a blog on internet marketing. The reason why I started my blog is that I found it quite flexible and good marketing strategy.

nicosa54 March 15, 2009 at 6:31 pm

thank you for thiis interesting ticket, if only peopple understand what you say :) it s nice to vvisit this interesting blog :)

Seo submissions March 26, 2009 at 9:34 pm

Great post on the internet works. I used to just simply to a little blogging but I found out that social bookmarking and search engine submissions are also helpful for marketing. I will be trying that soon.

Jeff Paul Internet Marketing April 2, 2009 at 10:22 pm

Nice post! I’ve been reading a lot about Jeff Paul and his products. I’ve been using his system for around 1 month now.

Sanjay September 1, 2009 at 5:09 am

This also works but there is also another way to do it. You have to install ‘All in one SEO’ plugin and configure it at the admin panel.

Mostofa October 29, 2009 at 10:32 am

I’ve gotta be honest, I’ve used Blog names in my title just so search engines can pick it up. But this puts a slight different slant on things now. Cheers.

Leave a Comment

Previous post: How to turn old slides and negatives into digital memories

Next post: How to use Gmail when offline