Skip to content

Wordpress: How to remove the blog title or name from the post title in your header.php file

I was googling around this morning trying to figure out how to remove the title of my blog from every post page for better search rankings (SEO). I did find several possible solutions. I studied all the possibilities, and I came up with the easiest bit of code to enter in your header.php code:

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

This should remove the name of your blog from your post pages, but leave it visible on your home page.

Tags: blog title, code, how to, search rankings, SEO, Wordpress

Related posts

Post a Comment

Your email is never published nor shared.
RSS 2.0 feed for these comments