Thursday, March 18, 2010

How to add meta tags to your blog’s front page and posts in WordPress

Meta tags like the description and keywords tags are what search engines use to identify the content of a page on your site. The description tag is the most important meta tag because it is displayed to search engine users on result pages. For example, when I search the term ‘blog’ in Google, the first result looks like this:
The text that reads: “Blogger is a free blog publishing tool from Google for easily sharing your thoughts with the world. Blogger makes it simple to post text, photos and video …” is actually the meta description tag for Google Blogger’s frontpage. When I navigate to the page (by clicking the link) and view the source of the page, I can see this chunk of code at the top:


The description is declared within the meta description tag. The syntax for this tag is simply: but remember that you must insert it between the HTML header tags for it to work.
The meta keywords tag is sometimes considered to be the second most important meta declaration. When the web was in its early stages, the meta keyword tag was used in HTML so that search engines could easily categorize your page (and therefore index and rank better). However, as the web grew, people (mainly spammers) inevitably began taking advantage of the meta keyword tag and declared keywords that weren’t relevant to the content they had on their pages. Search engine developers, catching on to the game, then grew distrustful of meta keywords and modified their algorithms so that meta keywords would count little for search engine ranking and indexing purposes.
There is still debate today as to whether search engines, like Google, even bother considering meta keywords; but most web developers concede that it couldn’t hurt to add them to your pages — just in case.
The syntax for the meta keywords tags is very similar to the description tag and it goes like this: . It does not matter if you have spaces between your keywords and you are able to have keyword phrases which are multiple words between each comma.
Inserting the meta description and keyword tags into individual post on your WordPress blog
If you are a WordPress user, you probably already understand that you do not have access to the header (the place where your meta tags will be) for each post and page. Installing a plugin like
Meta SEO Pack (highly recommended) will allow you to easily edit both the meta description and meta keywords tag for your posts in the edit post page of your admin control panel. It is recommended that you add meta descriptions for every single post on your blog. This will not only cause search engines to view your blog better (Google wants you to have unique meta tags and will reward you with more visitors if you use them) but will also enable you to send a message to people who see your site displayed in their search engine results.
Why should people visit your page? What are you offering them specifically? These are the kind of questions you should ask yourself when creating a meta description tag for your individual posts.
Inserting meta tags into the frontpage of your WordPress blog
Because the index.php page is so dynamic, WordPress does not have a way of editing your frontpage from the admin control panel. You can use the Meta SEO Pack to add tags to your frontpage or you can edit your theme’s header.php and do it manually. You can do that by clicking ‘Editor’ (under the Appearance tab in admin cp), then ‘Header’ (header.php) on the list of files to the right. Insert the tags anywhere between the and tags but make sure you don’t alter any of the php code.