Many services ask you to verify your site by entering metadata into your header. But how do you go about doing this? We are going to show you the right and wrong ways to get that information there.
We have all been there. Needing to add a code into the header or footer of our blog for some reason or another. Usually as a step in verifying our blog with a new service, to show that we are the rightful owners. Now there are many plugins written for Google analytics, Yoast can handle Google webmaster, Bing!, Pinterest, and more. But what about those that do not have a specific plugin?
This is one of the many questions that I had seen in a Facebook blogger group today. Someone else did try to help.
Their solution was to go in and add the code manually into the header.php file for the theme. Granted this solution WILL work. But it is only a Band-Aid to anyone facing this problem. You run a very high risk of losing your code in the future. If you do not know how to set up child-themes, all it takes is one update.
Another reason is, what if you change themes? If you change to a different theme, all of those manual changes you coded will disappear. These two reasons are why you will find many a WordPress help site that encourages you to not go about editing theme files manually.
That’s all fine and good, but how do I go about adding metadata into my WordPress header then?
Enter the Header & Footer plugin!
Another advantage of using this plugin, it is not dependent on any theme. You are free to change your theme alll you want, and there is no fear that any of the coding that you have done will up and vanish on you.
Using Header and Footer To Add Your MetaData
Since the Header and Footer plugin is free to use, it can be installed directly from the WordPress plugin directory to your site.
To do so, log into your site’s admin area (http://yoursite.com/wp-admin) and then navigate to Plugins > Add New using the sidebar menu.
From the Add Plugins screen, search for “Header and Footer” in the search box. There will be a few different results that come up. The one we are concerning ourselves with here is the one by Stefano Lissa. It should look like the following image:
Once you have the plugin installed and activated, it can be accessed from the “Header and Footer” item under the Settings menu on your admin sidebar.
By selecting different tabs, you can paste or write your codes into the section you would like them to be in.
You can now edit the header and footer sections on your blog with ease.
A word of caution though. See the tab for Facebook? If you are using another plugin to manage your OpenGraph tags (like Yoast), do NOT activate or use this section. Using more than one plugin to add these tags will create validation errors on many sites, and nobody wants that to happen.
This plugin makes it easy to add new code to the header and footer of your WordPress blog, without having to go in and manually edit any theme files. Have you tried this plugin or have questions about it? Let us know in the comments section.