How To Add SEO Friendly Title To WordPress Theme?

add seo friendly title to wordpress theme

When you buy any WordPress theme, do you check whether it is SEO friendly or not? If you’re a web developer or just a blogger then do you know how to add SEO friendly title to WordPress theme?

How can you modify the title so that you don’t need any SEO plugin to make it SEO friendly? Most of the people don’t even think about such concepts and chose the wrong theme.

Before buying a WordPress theme, you should check its SEO friendly features. After installing a theme, you may notice that on the home page of your website, you would want the title as your blog name and the tagline.

Along with that, only the post name should appear when you open any blog post.

Add SEO Friendly Title To WordPress Theme By Editing header.php file.

If you know about the WordPress theme file structure then it won’t be so hard to edit any file from the theme folder. Whether you edit it from the WordPress admin panel or from the cPanel.

And if you’re developing a new theme then just open header.php file and start editing.

In the title tag, you would find a code similar to this.

<title?<?php echo bloginfo(‘name’); ?><?php echo the_title(); ?></title>

This code will show the blog name and the title of the post together. But we want to show the blog name on the homepage/blogpage and the post title on the post page.

It can be done by editing the code using some condition. Just choose a code which would check when a user visits the homepage/blogpage then the blog name with the tagline appear and when he/she opens any post then only the name of the post appears as the title.

Just add the code in the header.php file.

<title><?php if(is_home()) { echo bloginfo(“name”); echo ” | “; echo bloginfo(“description”); } else { echo wp_title(); } ?></title>

Here we have added the condition we wanted. This is the SEO friendly title for your blog. Now you won’t need to depend on any SEO plugin to handle the title of your blog.

Most of the blogger ignores the SEO for their blog. But you shouldn’t. Choose the right WordPress theme which has all the possible features for better SEO.

Replace Your Current Code And Add SEO Friendly Title To WordPress Theme.

I have noticed in many WordPress themes, the title is not what we want. People are dependent on the plugin and it’s hard to say which theme is SEO friendly or not.

If you’re a developer then you check the title availability by checking the source code of the theme. You can inspect the header element and check whether the title is SEO friendly or not.

If you’re having a theme with an inappropriate title then use the above-mentioned code and add SEO friendly title to WordPress theme.

by Ravi Chahar

A blogger, web developer, and designer who intend to guide his readers about WordPress, Blogging, Web Development, Web Design and more. I have expertise in WordPress theme development and customization. I can set up and redesign the Thesis themes. I have been working in this field for years now.

2 comments

  1. Hi Ravi,

    Long time.I’ve been offline for all while now, as you may have noticed.

    You make editing our WordPress files simple.

    And for those of us still educating ourselves in WordPress, posts like this is a helpful resource.

    When I started blogging, I tried grabbing infos like this by heart. The only thing that nearly impeded my progress was it was hard finding simple and concise posts like this.

    That seid, thanks bro.

    Francis
    Francis Quarshie recently posted…6 Figure Income Bloggers You Must Know in 2016My Profile

    1. Hey Francis,

      WordPres isn’t so hard to learn about. You can embrace your skills by practicing the codes. And even you won’t need to dwell into code, you can do everything with the use of plugins.

      But if you want to be a developer then WordPres functions can help you. Thanks for stopping by.
      Have an awesome day.
      ~Ravi

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge