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:

18 Comments

  1. skeet says:

    Aloha! I've added you as a Technorati favorite. I hope you'll fave me, too!

    http://technorati.com/faves/?add=http://skeetsstuff.skeeterbess.com/

  2. James says:

    good stuff RT. Once I wrap up my latest IT project, I'm going to go through these.

  3. Herman Begin says:

    Nice. will get to this just as soon as i get off work!

  4. Herman Begin says:

    Thank you. Will get to this just as soon as i get off work!

  5. thanx for ur nice seo information where i can find more information about? would be glad if u can send me via email or say it here i will return after the weekend think monday or thur.

    Seo Breisgau Blog's last blog post..Seo Blog Farming, die neue Art des Backlinks grabben.

  6. [...] or leave a comment.What's worth reading today? Here's what I've been looking at. Search Engine Optimization (SEO) for WordPress¸ Part 2 is nice post. Don?t Forget Your Signature! How Email Signatures Do Help You shouldn't be [...]

  7. Geoff from Search Engine Optimization says:

    A question about the blogroll code, since the links are still appearing sitewide, do you find this still causes duplicate content issues?

    • I no longer have a sitewide blogroll. I don't think it matters much nowadays except that it counts toward the number of external links, which should be 100 or less (according to Google). "Nofollowing" the links would solve that issue, but wouldn't give any link juice to the sites in the blogroll.

  8. 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?

  9. 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.

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

  11. basmin from tukang nggame says:

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

    tukang nggame

Leave a Reply

CommentLuv Enabled

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.

Anti-Spam Protection by WP-SpamFree