Head tag is the first thing of a wordpress theme index page. This content is not readable for human. However, search engines pay close attention to that. Therefore, we also need to pay a very close attention to the same. In this tutorial, I will guide you the simple codes for this section. So, please get a pen and paper and write down the important codes.
Please do not copy any text from anywhere. However, you will get a site ready, but you will not learn anything. Also, I have written a theme development general introduction and my previous post was about index page. Consider checking those two posts for more clear concept before you continue this step. Now let’s start with our present tutorial.
First of all, we will be writing codes only between starting and ending tags of head. I have attached an image at the bottom of this post for clear understanding. First, we need to write the charset of our theme. The full form of charset is character set. So, search engines will be able to identify our website properly. We will be setting that as utf-8.
Then we will work with the view port section. This section is for making our theme responsive. So, it will adjust properly in all devices including both desktop and mobile versions. You can’t rank your site on Google with this now a days. Therefore, we will set the content to device width in 1.0 initial scale.
Next, we will write our custom theme title tag. You can set that dynamic. I will guide you that on next posts. The final step is to make the link rel canonical. So, search engines will know that the page is canonical. Next post is about wordpress theme head tag – advanced level tutorial.