How to insert code to wordpress header.php correctly: Best guild
How to insert code to wordpress header.php correctly
Go to your wordpress dashboard and click appearance > Editor > Theme header.php, on your theme header.php file look for <head>…… </head> tag it normal find among the first set of codes on the header.php file at the top. Insert your code in between the <head> ….. </head>, for example if the code you wanted to insert is <meta name=”robot” content=”index, follow” > then it will be inserted like this
<meta =”robot” content=”index, follow” >
This is How to insert code to wordpress header.php
On the example above you can that the code is inserted inside the head, which is <head> code here </head>, You see how easy it is?. Also note that if the code is not inserted properly it will not work, rather it going to mess up your website top page appearance, until you have the code insert properly. Note that more than 5 codes even hundred codes can still be inserted into the <head>….</head> depending on their functions.
Some good reason make people want to edit their header.php file, in most cases inserting google console verification tag to your header, also known as google webmaster. In case your reasons is verifying google webmaster tag by insert the code to your website header.php then just follow the step above. You can also read how to upload google webmaster verification code to wordpress website root.
It also very important for new or old website to always check their website or blog for duplicate content. if you haven’t heard duplicate content can pull down a website/blog completely from search engines. You can stop duplicate content by adding some codes to your wordpress theme header.php by just follow the step of inserting code to header.php shown above, You might have heard how much harm duplicate content can cause a blog/website. In case you haven’t heard about duplicate content harm to website/blog then it high time you start making some good high research so you don’t fall Victim of duplicate content which could cause your business
a lot down side on google search engines. You can read this complete guild How to stop duplicate content in wordpress blog or website.