WORD OF CAUTION - DO NOT make any changes in the Editor unless you truly understand the code. You can break your site quickly and the issue will be hard to find.
There are some plugins or other items that ask you to put code into your site.One example is your Google Analytics Tracking Code.

The <Head> area of the webpage is used by the browsers to determine what it will find on your website. One of the things you will be asked to put into your <head> section is your Google Analytics Tracking Code.

To add or look at the <head> section of your webpages, you will want to go to:

Appearance --> Editor --> header.php

This is what my <head> section looks like on my website:

As you can see there is some PHP code in there along with my Google Analytics code. What is missing? My META Tags!! Some themes include certain ones automatically, but it seems the theme I am using did not.

Meta Tags

Meta tags contain information such as author, keywords, description, revision date and so much more. You can even use meta tags to prevent things from being shown like the right click print menu. Here is a list of different Meta Tags with their syntax (correct punctuation etc)

  • <meta name = "keywords" content = "Tables, Images, Links" /> We all know how important that keywords are. This will add keywords to your homepage and give google an excellent idea of what you are working on.
  • <meta name = "description" content = "Learning what Meta Tags are about." /> This also works like the <Title> tag you can add in your <head> section.The way wordpress is written, when you put this into your header.php, it applies to every page that shows. You will have a hard time adding seperate titles for each post. However, Wordpress takes care of this for you internally.
  • <meta name = "revised" content = "HTML, 2/12/2018 /> Any time you make a revision to your site, you can go into this meta tag and update the dates.
  • <meta http-equiv = "cookie" content = "userid = justme
  • expires = Saturday, 01-JAN-18 23:59:59 PST;" /> Cookies are a way of websites tracking your visit. For instance, if you visit a link to Wealthy Affiliate through someone's page, you will gain a cookie on your computer showing you visited and on what date. It also states when the cookie will expire.
  • <meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8" /> This is how you want to paste this. UTF-8 is used for XML.
  • <meta name="copyright" content="Trademark of Yourcompanyname"/> Some wordpress themes allow for copyright on your site,but if it doesn;t you can add it with a meta tag.
  • <meta name="robots" content="Index, Follow"/>you have two options here. You can do Index,Follow or you can have NoIndex, NoFollow. We want to make sure ours is Index, Follow.
  • <meta name="author" content="Your Name">

These are just a few of many that your site can benefit from. There is absolutely nothing wrong with adding these to your header.php. Just make sure that you adjust the Content=" " to your sites information. I have highlighted everything in Bold that needs to be adjusted to your site.

As you can see, there are many benefits to adding your meta tags to your header.php.

However, be aware that if you adjust the header.php as it is, you will have a chance of it being overwritten by an update of your theme. You may need to recheck your header.php to make sure that your Meta Tags are still there. If they are gone you can re add them.

There is a more complicated way of addressing this but will avoid the update issues. You can make a copy of your theme, rename it. Change your header file and activate your new copy. This will prevent it from being over written. However, you may miss out on important updates to your theme when it happens.SO, you will have to check your new version with your version to update any files that need updated.

Either way is a bit of a pain but to me just adding the meta tags back in is the quickest and easiest of the two.

My updated <head> Section:




Tasks 0/2 completed
1. In your new webapge in notepad, I want you to add some meta tags to your <head> section. You do not have to use all of them, just add the ones that are relevant to your site. Keywords, Description, Content-type. and Copyright. You can add the others if you like.
2. Add a picture of your notepad pade to the comments so that we can see how your doing :)


Top Helpers in This Lesson

Join the Discussion
Write something…
Recent messages
AffilateMAN Premium
Hi
Last time i tried to use html & make some modifications to my site but it is saying that i don't have right to do that modification & i should contact the editor...so i stop my modifications.thank you for the helpfull lesson
Reply
edensbox Premium
Whenever you do editor, It is going to put up a big warning that you are changing them and should do it a different way.

Since we do not have access, well, I can't get my ftp to work, its the only other way you have to change a file. Its a warning and can hit ok and go back in
Reply
DBlanchard Premium Plus
Thank you Eden, very well explained and easy to follow!!!
Reply
edensbox Premium
THank you :) Glad you liked it. Get ready for HTML2
Reply
suzieq Premium
Hey Eden, is there a way to make changes to the title? I’d like to make it bold and a larger font. My theme won’t let me.
Sue
Reply
edensbox Premium
Depends on the theme and the CSS but we can look at it. What theme are you using?
Reply
jmaurice Premium
This is the type of training that will benefit you in your current and future campaigns. its long-term uses what makes it so valuable. Thanks for your tutelage
Reply
edensbox Premium
Thank you Jmaurice. There is lost more content to come with the HTML topic!
Reply
Nick-at-WA Premium
It worked! This is so cool...:)
Reply
edensbox Premium
Nick, I am so glad you found it helpful. I am going to write a Level 2 that will go deeper into some of the code.
Reply
Nick-at-WA Premium
Thanks, I'll wait for that.
Reply
Top