Search Engine Optimization (SEO) for WordPress, Part 2

As I mentioned in the first article of this series, Search Engine Optimization (SEO) for WordPress, Part 1, I'm fairly new to the SEO arena, being as how I knew nothing to start with and know very little now. I am learning, though. As I have been implementing changes to make my blog more attractive to search engines, I have avoided changing things that would have a negative impact on the people I link to or on the ability to navigate around my blog with ease.

In this second part of the series, I'm going to focus on the possible duplicate content the search engines see when you have your blogroll, top commenters and other outbound links on your sidebars. The reason I say "possible" is because there's serious debate on whether search engines automatically filter the links in the headers, sidebars and footers of blogs. My thought about it is: Why take chances? If they can remotely affect search engine standings, why don't we do something to minimize any negative impact?

WP plugin: Add Link Attribute

I linked directly to the plugin page for the Add Link Attribute plugin because I think it solves this particular problem nicely.

The plugin lets you insert your own HTML tag attributes into most, if not all, template function-generated links, without the need to rewrite those functions directly. The purpose is to avoid having to edit the core source code just to add an attribute into an HTML link.

What attribute am I talking about? rel="nofollow"

I consider this attribute to be anti-productive and not friendly at all when used with comments, which is the default for WordPress right now. If you leave it that way, when someone posts a comment for one of your articles, the link to their blog will not be indexed by the search engines. That's why I recommend using the Dofollow Plugin.

Show Top Commentators

This plugin allows you to show the top commentators for your blog in your sidebar. It's up-to-date for the current version of WordPress and pretty flexible. You edit one line in the plugin itself, to specify what you want to show, transfer it to your plugins folder and activate it. After that, you simply call this function:

ns_show_top_commentators();

You can put it inside a widget or you can just have it on your sidebar outside a widget, the choice is yours. Now it will show on your front page and every other page.

This is where we get to use the "add link attribute" function to make the search engines follow only the links only on the front page. This took a few minutes of work on my part to get it right, but it makes it flawless:

<?php
if (function_exists('ns_show_top_commentators')) {
if (function_exists('add_link_attr')) {
if ($_SERVER['REQUEST_URI'] == "/" || $_SERVER['REQUEST_URI'] == "/index.php") {
ns_show_top_commentators();
} else {
add_link_attr('ns_show_top_commentators', ", 'rel="nofollow"');
}
}
}
?>

Blogroll

I like having my blogroll accessible from every page. I don't want the search engines to freak out about duplicate content, so I altered it from what it is in WordPress 2+ and substituted my code which includes the "add link attribute" function:

<?php
if ($_SERVER['REQUEST_URI'] == "/" || $_SERVER['REQUEST_URI'] == "/index.php") {
get_links_list('name');
} else {
if (function_exists('add_link_attr')) {
add_link_attr('get_links_list', 'name', 'rel="nofollow"');
} else {
get_links_list('name');
}
}
?>

Both pieces of code I provided will not work for all themes or all circumstances. You'll have to play with it to make it work for you. If your blog is set up like mine, defaulting to "http://www.untwistedvortex.com/", they will work perfectly.

Because I'm a friendly person and because I usually have the time, if you can't get it to work for your theme, send me a message (use the contact page) and I'll do my best to help you with it.

Tune in tomorrow (hopefully) for the next installment in this series.


Similar Posts:

19 Comments

  1. I am making a website using wordpress as my CMS of choice. I am strictly using pages and not categories as I don't want my site to look like a blog. Would this be bad for seo for any reason?

    • RT Cunningham says:

      As long as the linking structure is in place, it doesn't matter whether you use pages or posts. A page and a post are identical in most regards. They are only differentiated by how WordPress structures the home, category and tag pages.

  2. web trust says:

    Are you sure that if linking structure is in place then pages or posts doesn't matter. I have found some problems in my blog with my pagers what could be the actual problem.

  3. A very helpful tutorial. Thank you for posting this.

  4. thanks for tips and hopefully this can assist seo problem at my blog.

    tukang nggame

  5. nice Search engine optimization tips

  6. Content

    Content is King. Content is spider food. The search engines are looking for the foremost authority on a keyword or phrase. Make sure your site has plenty of keyword rich content high on the page that is useful to the visitor as well as digestible to the spiders. Make use of H1, H2 and H3 headlines that contain your keywords. Make sure your prose is natural and easy to read.Don't go overboard and make every other word on the page the keyword you want to rank the page for. Stuffing the page with keywords is considered a form of spam.Focus on search phrases, not single keywords, and put your location in your text ("our Palm Springs showroom" not "our showroom") to help you get found in local searches.Having terrific content will not only be great for your visitors and spiders, but it's wonderful link bait, too (see Links below). A blog is a great way to create fresh, new content (for the spiders and for visitors) and attract inbound links.Also, use Flash animation and images sparingly. Spiders can read text, not Flash nor pictures. A sure way to kill any chance of ranking well is to create a site that is all Flash or mostly images.

Leave a Reply