Home / Blogging, SEO, WordPress / How to remove blog name from single blog post title in WordPress

HowToPlaza Earn money writing

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

by Sarah Watts

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.



Related posts

  • 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.
  • 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.
  • 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.
  • 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.
  • thank you for thiis interesting ticket, if only peopple understand what you say :) it s nice to vvisit this interesting blog :)
  • 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.
blog comments powered by Disqus

Previous post:

Next post: