{"id":2845,"date":"2011-05-05T09:54:36","date_gmt":"2011-05-05T15:54:36","guid":{"rendered":"http:\/\/www.evolutionarydesigns.net\/blog\/2011\/05\/05\/quicktip-how-to-find-and-use-the-head-tag-in-wordpress\/"},"modified":"2011-05-05T12:25:03","modified_gmt":"2011-05-05T18:25:03","slug":"quicktip-how-to-find-and-use-the-head-tag-in-wordpress","status":"publish","type":"post","link":"https:\/\/www.evolutionarydesigns.net\/blog\/2011\/05\/05\/quicktip-how-to-find-and-use-the-head-tag-in-wordpress\/","title":{"rendered":"Quicktip: How to Find and Use the Head Tag in WordPress"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/www.evolutionarydesigns.net\/blog\/wp-content\/uploads\/2011\/05\/1304606924_wordpress.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" style=\"display: inline; margin: 0px 10px 0px 0px; border: 0px;\" title=\"1304606924_wordpress\" src=\"https:\/\/i0.wp.com\/www.evolutionarydesigns.net\/blog\/wp-content\/uploads\/2011\/05\/1304606924_wordpress_thumb.png?resize=200%2C200\" border=\"0\" alt=\"1304606924_wordpress\" width=\"200\" height=\"200\" align=\"left\" \/><\/a> As a website owner, you might be asked to add a line of code to your website. Sometime it is simple as adding it somewhere in the theme. But lets say you want to add\u00a0 web analytics software on your site. Programs such as Google Analytics and many others ask that you <strong>add code to your head tag<\/strong> on every page of a site.<\/p>\n<p>The first thing you want to do is look for a plugin that will add the wanted code to your head tag. Just keep in mind, that the more plugins you add to <a href=\"http:\/\/www.wordpress.org\" target=\"_blank\">WordPress<\/a>, the slower your site will run. So if you have a lot of code to add to your site, look into the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/all-in-one-webmaster\/\" target=\"_blank\">All-in-One-Webmaster\u00a0 Plugin<\/a> if you are adding a bunch of analytic code.<\/p>\n<p>If you have to many codes\/scripts to add or you can not find a plugin that works, then you will have to add the code to the head tag yourself.<\/p>\n<p>Adding code to the header of your WordPress Blog is easy. WordPress made it simple, by adding editor to your admin panel. The editor will allow you modify your theme\u2019s code. To access the editor, Log in to your dashboard and good to your appearance section and select editor. Once you get into the editor you find a list of files that can be edited. You will need to select a file called header.php.<\/p>\n<p>Once you open your header.php file, make sure to backup the code. Just copy your code and pasted it into a notepad file and save it. If you do not save the file and you overwrite the code, you will break your website. You will have to delete your theme and reinstall it or even worse, you might have to find the individual file and upload via FTP to get the right file in place.<\/p>\n<p>Below is a screenshot of what my header file looks like.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.evolutionarydesigns.net\/blog\/wp-content\/uploads\/2011\/05\/headerfile.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" style=\"display: block; float: none; margin: 10px auto; border: 0px;\" title=\"header-file\" src=\"https:\/\/i0.wp.com\/www.evolutionarydesigns.net\/blog\/wp-content\/uploads\/2011\/05\/headerfile_thumb.png?resize=619%2C304\" border=\"0\" alt=\"header-file\" width=\"619\" height=\"304\" \/><\/a> In the red box you can add your code. Just make sure its in between the head tags.<\/p>\n<p>[html]&lt;head&gt; &lt;\/head&gt;[\/html]<\/p>\n<p>&nbsp;<\/p>\n<p>In some themes, you may not have the option to update the header file. This could because you are using a child theme, such as <a href=\"http:\/\/www.evolutionarydesigns.net\/blog\/get_studio_press\">StuidoPress<\/a>. If this is the case with your theme, look for a plugin called Hooks or open hooks. Basically it adds custom fields to your dashboard to allow to modify your child themes without the worry modifying the original files.<\/p>\n<p>Also keep in mind, your theme has an upgrade and you upgrade, then you will loose your changes to the files. Your best is to keep those codes in a notepad file with instructions on where the code goes you can easily add it back after the upgrades.<\/p>\n<p>Image Source: <a href=\"http:\/\/www.iconfinder.com\/icondetails\/40985\/128\/wordpress_icon\">Inconfinder<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a website owner, you might be asked to add a line of code to your website. Sometime it is simple as adding it somewhere in the theme. But lets say you want to add\u00a0 web analytics software on your site. Programs such as Google Analytics and many others ask that you add code to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[14,9],"tags":[827,823,822,790,127,821],"class_list":["post-2845","post","type-post","status-publish","format-standard","hentry","category-tutorials","category-wordpress","tag-customize-wordpress","tag-hacks","tag-head-tag","tag-wordpress-customize","tag-wordpress-hacks","tag-worpress","entry","has-post-thumbnail"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pJPdG-JT","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/posts\/2845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/comments?post=2845"}],"version-history":[{"count":0,"href":"https:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/posts\/2845\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/media?parent=2845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/categories?post=2845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/tags?post=2845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}