How To Remove Blog Name from Single Blog Post Title in Wordpress




It is very important that you optimized your blog post titles. Titles are very important for  SEO. If your WordPress blog name contains many keywords and that similar with blog  title, it may be considered as spam by major search engines.

Use a conditional tag in header.php to determine whether it is your homepage or single blog post. Replace your <title> ... </title> with the following code:

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

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.

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: How to Modify Blogger Post Title for Better Ranking

{ 0 comments... read them below or add one }

Post a Comment