Update: Too much caffeine can make you think too fast and make plenty of errors. All errors have been fixed for this guide – thanks to those who pointed it out!
If for some reason you can’t use any SEO plugins (All-In-One SEO, SEO Title Tags) due to some complications with the way your blog is set up (eg. Webmaster Index), you can still make your blog SEO friendly with some manual loop hacks. In this guide, I’ll cover ways to easily include the title tags, keywords meta tags and description meta tags based on the type of page that’s being displayed. (I know the keywords tag isn’t all that necessary, so that step is optional)
It’s All In Your Head….er
Open up your template’s header.php and get ready to get your hands dirty (as a precaution, I recommend you make a quick backup before you proceed).
Let’s get started with modding the title tags. Look for this fairly near the top:
<title><?php wp_title(); ?> <?php bloginfo('name'); ?></title>
Now you’ll probably want to first change your blog’s homepage title tag. Use the following code as an example:
<title><?php if (is_home()) : // This can instead be is_front_page(); if you're using a static page ?> My Front Page Keyword | <?php bloginfo('name');?> | Other Keyword <?php elseif (is_page('4') : // Example: If the page ID = 4 then use this title: ?> Another Keyword, Keyword | About <?php bloginfo('name'); ?> <?php elseif (is_page('5') : // Example: If the page ID = 5 then use this title: ?> Another Keyword, Keyword | Contact <?php bloginfo('name'); ?> <?php elseif (is_category('Web Design') : // Example: If category is titled Web Design: ?> Web Design Posts & Articles | <?php bloginfo('name'); ?> <?php else { // For everything else, including posts: wp_title(' | ','true','right'); bloginfo('name'); } ?> </title>
You will want to change that around and edit it to match your needs. BUT, if the is_home() or is_front_page() don’t work because maybe your static front page creates multiple pages that makes Wordpress think it’s just one page (like our webmaster directory) – you can get really picky and change the first line above to:
<title><?php if($_SERVER['REQUEST_URI'] == "/"): ?> My Front Page Keyword | <?php bloginfo('name') ?> | Second Keyword // That basically displays the title tag if the server shoots back "www.yourdomain.com/" URI. // rest of the code </title>
Custom Fields For Meta Descriptions / Keywords
For your posts / pages, we will be calling to check if you’ve set up a custom field for meta data. So as you create posts and pages, create new custom fields and name them something like: meta_description and meta_keywords. As for your home page, you can use the similar title tag example above but with meta tags instead, use the example below. Go back to editing your header.php and find the area where meta tags are created, if they aren’t there just insert the code below the title tags:
</title> <meta name="description" content="<?php if (is_post() || is_page()) { get_post_meta ($post->ID,'meta_description',true); } elseif (is_home()) : ?> Mydomain.com provides useful tutorials and the likes, and blah keyword here blah.. Blah Blah. <?php endif; ?>"> <meta name="keyword" content="<?php if (is_post() || is_page()) { get_post_meta ($post->ID,'meta_keywords',true); } elseif (is_home()) : ?> keyword1, keyword2, keyword3, keyword 4 <?php endif; ?>">
Now you’re all set to enjoy plugin-free SEO friendly title tags and meta data. Even though SEO plugins are much easier and convenient to use, not all blogs (like Webmaster Index) can run smoothly with them. Be sure to read up on how to write a robots.txt file and link building tips to get more SEO friendliness on your blog.

