Stop WordPress blog’s title from appearing twice on browser - Make Money Online

Breaking

Saturday, 13 July 2019

Stop WordPress blog’s title from appearing twice on browser

This is a very common issue that bloggers face, when they are setting up a new WordPress blog. Often, during the set up process, they notice that the blog’s title is appearing twice on the browser! For example, like this- ‘Title of the post: blog title- blog title’. It may not appear in the exact same way, but may appear with some minor changes. Today, I’ll show you how to solve this problem. I’ll also try to keep this post a quick read, so that you can learn the fix and go back, apply it on your blog as soon as possible!
WordPress logo

WordPress
First of all, let me tell you the reason why title appears twice on WordPress blogs. There is more than just one reason-

Reason for blog’s title appearing twice in WordPress blogs

This results many times, when conflict related to the <title> </title> section arises among different plugins and parts of the blog. Let me show you how this happens usually.
On a WordPress blog, usually title is set-up by the blogger using the Settings> General> Site Title section. But in case of many themes, there are options to change the structure of the titles (posts, pages etc). Then comes the SEO plugins, which also have individual settings for settings up titles for posts and pages!
So, the title may be appearing twice because of any of the above mentioned settings conflicting and rewriting the title! How to solve this problem, you might ask! Here are the possible solutions-

How to solve the issue of blog title appearing twice on browser-

The first step should be to disable the title settings in the theme. Stop it from interfering with the title section in the General section. Or else, if you are too fond of the title settings of the theme, then delete the title settings from Setting> General> Site Title section.

This will solve the problem in case of theme conflicting with the title section and making it appear twice. Now comes the second solution.

If you notice that it is after installing the WordPress SEO by Yoast plugin that this problem is popping up, then use this method, which I’m going to describe. First of all, open WordPress SEO by Yoast’s dashboard and uncheck the ‘Force Rewrite’ option in the ‘Titles and Metas’ section.
Now, head to Appearance> Editor> header.php file in the dashboard. Once you open that file, and find the section enclosed within the <title> </title>tags.

Select that entire section (and the code contained within) and replace the existing code with the following code (slanted text only)-

Code= <title><?php wp_title(‘ ‘); ?></title>

After inserting the code, save the file and clear cache. Now check if the problem persists or not. If it is the SEO plugin causing the problem, this trick will help solve the problem!

But before you start messing around with header.php file, make sure that you take backup of that file. It is better to have a backup, because, things can go wrong, you know!

That’s it. These solutions will help solve the problem of blog titles appearing twice on the browser, in case of WordPress blogs. If you liked this article, please share it!

No comments:

Post a Comment