How to SEO a Wordpress Template
July 22, 2008 By: Justin | 12 commentsI recently offered to SEO Wordpress themes for for my visitors. This lead to some comments about how to SEO a Wordpress template and what I would be doing. I thought I’d walk you through how I personally optimize my Wordpress templates for search engines. I’m going to use my theme as an example. It isn’t “perfect”, but it has some solid SEO strengths. When doing Search Engine Optimization, it is important to structure your code with intent. A web designer’s concern is how the template appears, but an SEO’s job requires them to worry about how Google reads the code. A solid template will help you rank higher with Wordpress.
I took a screenshot of my source code. It is below. Warning, its huge. I made it smaller, but I thought this was a solid way to explain exactly what I am doing. I suggest opening the image in another tab (if you do not have Firefox, get it now). I did this so I could highlight sections, you can also just view my source.
(it is big)
Template Structure
I generally structure my templates like this.
- HTML Header
- H1
- Content
- H2’s
- Sidebar
- H3’s
- Footer
- Anchored link to home page
You’ll see the basic layout with my template. Which I’ll walk through in just a moment
Clean Code
I’m a big fan of standards design and working to validate my code. I’m not obsessive over it, but I make effort to reduce the number of errors in my code. I program with divs and CSS, not tables. This isn’t a must for SEO, because Matt Cutts has said they don’t penalize you for bad code. But the important thing is making your site easy to crawl. Tables give search engines a hard time. You have to remember it is a computer trying to figure out your site. Computers have limited intelligence, so make it easier for them. This won’t make you rank higher, but it will help Google crawl and index all of your information (which indirectly can help your rankings).
So when I get a new template, I always take some time to clean up the code. Remove any errors or bad coding practices.
Secondly, many free templates hide stuff all over the place. This site runs on a free template, but the original was HORRIBLE. It had links and ADSENSE hidden everywhere. Yes, the fool hard coded his Adsense into the template, so I had to go file by file and find it. I already go through and scan every line of text to make sure I know exactly what I’m about to put up and link with my network.
Guided Tour Of My Wordpress Template
Template Header
So let’s start with the header, its not too complicated, there are only a few things to point out. I’ve highlighted my whole header in blue.
First, you want your template to have a strong title. I use All in One SEO to manage my titles. I make sure the title is set up so it can use All in One SEO. You can see my title, which is the second one I highlighted in red.
I also added Geotags. Now this is a little nontraditional, but there are meta tags designed to tell your site’s geographical location. I am geotargeting this site, so I wanted to emphasis my geographical location. I do not know how much trust Google places on these since their isn’t much documentation on it. The only change I saw was a reduction in my local business listings, but it doesn’t seem to hurt my rankings at all. I rank #2 for my keyword, so it seems to have helped some.
The last thing you’ll see in my header is that I cleaned up the code from Brian’s Threaded Comments. I made a post about that recently. I like reducing the space between the start of the document and the content. Also this speeds up your loading time by moving the code to external files.
H1 Tag
I put the H1 at the very top of the page. You can see it highlighted in red right after the blue section of the header. Most people who have done SEO for a while know Google applies extra weight to information in the H1 tag. Well Google also gives weight to words near the top of the document. When Google arrives at my site, the first thing they read in my body is an H1 tagged keyword. This improves the prominence of that keyword.
I like to follow this structure: tell them what you’re going to tell them, then tell them, and then remind them of what you told them.
The H1 tag is the “tell them what you’re going to tell them”. After reading my title, meta, and h1, Google already knows the content of my page. I then set off to reinforce the keyword.
Navigation
I’m breaking my advice here a little. Honestly, my navigation elements should come after my content. (I do with my sidebar) But I figured this little list was small enough to get away with. Its not really enough to push my content far down the page.
I suggest everyone go in and manually code their navigation menu. You should put no follows on these. There is debate and discussion that Google gives most weight for the first time it sees a link on your page and that the first link’s anchor text is counted the most. And some think 2nd and 3rd links are not counted. You do not want to set internal authority for the word “home” on your index page. Nofollow all the navigational elements that are useless.
Optimized Content
Nothing else to really say here, but go read my post on writing for search engines. I get lazy some times and don’t do it right all the time, but you’ll spot on my site when I’m focusing a post on purpose.
Take a look at this post. See the keywords in the intro paragraph? See how I worked my keywords into bolds and header tags? I can honestly write about what ever I want here in the middle. I will sandwich my content with my keywords, then include them in the title and H1. That’s enough to be optimized on site. After that, its just a matter of links.
H2 Tags
I use H2 tags for my post titles. These are given extra weight by Goolge. This way my homepage is give extra weight for these post titles. SEO’s like Griz set up their blog for 1 post per page, which is a great approach for Adsense. He makes sure every page is only optimized for 1 keyword. I personally don’t do this, because I like having a my recent stuff on the home page. It doesn’t really hurt, but I see it as a trade off of usability. You’ll see the H2 tags highlighted in green in the image of my template.
Sidebar
This is an important part of your templates design. PUT YOUR REPETATIVE NAVIAGATION SIDEBAR AFTER YOUR CONTENT.
Again.
PUT YOUR SIDEBAR AFTER YOUR CONTENT!
If you put it first, then the first 1/3 of every single page of your site looks exactly the same to Google. Improve your keyword prominence by pushing your content to the top and the useless stuff to the bottom.
Again.
Put your sidebar after your content.
You’ll see a highlight where my sidebar starts.
H3
Many themes use H2 tags in their sidebar to define the headers for the different sections. This dilutes the authority these tags carry by using theme on repetitive and useless keywords. So for the site bar, you should change these to H3 or just a div.
You’ll notice I do use H2 tags twice in my sidebar, which seems against my advice, but this was intentional. I include the phrase “SEO Zombie” in each one. I wanted to add extra weight to the word SEO, so this is an easy way for me to have SEO in H2 tags on ever page.
You can see my H3 tags highlighted in yellow.
Template Footer
Lastly, you need a strong footer. There are a couple things I did in my footer to help my SEO. First, I anchor one of my keyword back to my home page. This helps me push internal authority to my home page for that keyword. The second thing I do is to use my keywords in my footer. These don’t carry much weight, but it allows me to have my keyword used on every single page. Google can detect your footer, but every little bit can help. The last thing I do is include my city and state in the footer of every page. I am geotargeting targeting this site, so I want Google to see a reference to the city and state on every page.
I also nofollow the useless site wide links, because I don’t want to waste internal juice on them.
Conclusion
This is a long post to explain something that isn’t too difficult, but some people still don’t take the time to optimize their theme. With my theme, the keywords are the first and last thing you see. I put the important stuff first and the useless stuff last. I use headings and bold effectively. And I keep the code clean, so Google doesn’t have any problems. These seem minor, but strong on site SEO can move up an established site up by pages.
So I hope this helps you optimize your Wordpress template for search engines. For those who are comfortable with HTML / CSS, this shouldn’t be hard. If you have no experience with HTML and want some help optimizing your free wordpress theme, then let me know and I’ll SEO it for you.
Also, be sure to check my posts about SEO web design and writing for SEO.
Filed Under SEO Wordpress Themes |
Tagged With how to seo wordpress, SEO Wordpress Themes, wordpres search engine optimization, wordpress seo
Related PostsSite Design SEO
SEO lesson that covers all the major on site SEO factors used in the design of a website layout / template. Covers basic site structure and layout optimization. Covers SEO
BANS Template Modification
One important part of having a successful BANS site is having a good template. You don’t need to spend hours developing a theme, but you can increase your sales by
SEO BANS Template
SEO Zombie reworks the default BANS (Build A Niche Store) Template to improve its search engine optimization. This is a free BANS template that has a few SEO changes that
Adventure Tour | SEO Wordpress Theme
Here is another SEO friendly Wordpress theme. This time I took the Adventure Tour theme and made a few tweaks to improve its search engine optimization. I made a post
Zombie Sniper SEO Wordpress Theme
Releasing a new theme. It is inspired by the Transblack theme, which Vic suggests for usage on an Adsense niche blog. It is meant to generate high CTR. I took
















Clean code (as you mentioned) is great, plus minimizing white space in the coding.
Outta the park, man!
Honestly, you said all of this already on your blog. It’s my own thick skull that prevented me from applying it. I guess I was expecting some voodoo behind the scene but really it’s all about fundamentals. I, for one, am making this whole internet business much too hard.
You really teach people how to fish, and that makes your blog stand out in the MMO/SEO scene.
Dave
Thanks for all the great comments all the time. 80% of SEO is really just getting down to work and getting things down. Its boring too at time, but making money if fun =P
The main part of SEO is link building, which I haven’t covered year, but I’m getting ready to.
Hi
Your blog is very informative n helpful .. thanks…..keep it up.
great example of a useless spam link, lol
I remove your link in your comment and from your name. Thanks for visiting, but you made it really obvious you were just dumping a link.
Hey Justin - This is a really useful post on Wordpress theme best practices for SEO and anyone using Wordpress should apply them all. However, I was unable to check the code on your code image as the text is just too small to read.
Yeah, I did it like that so I could highlight it, but it was huge so I shrunk it. You can view my source though.
Right click, view source.
I’m using the cutline split from Court. It’s not as optimized as it should be. The left sidebar (and navigation) loads before the content. I tried moving it but it moved the physical location to the right for some reason. I just can’t seem to learn how to do this. I don’t know why either, because I’m really smart.
I took out the stupid masthead and inserted the keyword sniper h1 tag. That took me about one and a half hours to figure out, just to give you a baseline of my skill level.
I changed the home button to read “political humor home” most of the navigation is nofollowed, unless there is a reason to keep it followed. The sidebar still has h2 tags which is stupid, but the hell if I know how to change that. So, I stuffed the hell out of my keyword in the sidebar headers.
I put tags within the posts, because you can’t really use humor based keywords with any density in the posts. Forget a tag cloud. I have hundreds of tags, especially since I add tags based on search results, so I’ll have 6 different variations of a term in my tags.
I’ve got some invalid code. I’m at a loss on that too. I stuffed my keywords in the alt tags of the banner. Footer is anchored to my homepage and my other site.
I’d like the sidebar to load after the content but still show on the left. I’d also like to widen the main column about 75 px and double the right sidebar. People have widescreens now and I’d like my sidebar to take advantage of that.
It took me a few hours just trying to fix the spacing issues with the sidebars. It’s supposed to all be one background color, and I switched that causing the text bump up against borders, because that is how it was, you just couldn’t see it that way with the continuous background color.
I do like that the archives are summaries. I keep archives indexed and it gives me a lot of double index rankings.
I wish I knew what I was doing.
Coding be be a real pain at time, especially getting things to look how you want. Optimizing is fairly easy, but changing appearance gets more into designing. I will take a look at the theme.
Excellent post Justin.
Wordpress SEO is extremely important and most bloggers just neglect it focusing on the content. What they don’t realize is that, their hard word on the blog can be completely realized only with proper WP SEOing. My traffic has jumped almost exponentially over the last 1 month. My blog is pretty new. I think the only hinderance is that my theme is coded all wrong. There are too many margin codes that give the term “0px” an extremely high position when it comes to keywords. I just hope that someone starts a product called “0px” or else I’ll have to re-do my entire theme!
Hi Justin!
Great article.
What about ’synoptisizing*’ it down to a check list styled, maybe, “Justin’s WP Theme SEO”, and adding it to the foot of the article as an update. Then lazy coders like me can print it out and use it as a ready reference check list to keep our sites on (SEO) track. It might even become an ‘industry standard’ and earn you up masses of links??
*Synoptisizing. Verb: to Synopt[-isizing, -isized]; the act of creating a synopsis or précis.
© Copyright,2008 compac graphics (may be freely used with tongue in cheek and appropriate attribution!). ?
when you say, the google will see the side bar first and think it as duplicate content, if the bar is on left hand side.
so we should always have side bar on right hand side?
please correct me. thanks.