Turn Off Comment Pagination in WordPress

I recently noticed that I was having an issue with WordPress creating duplicate url’s that were being indexed by Google. Duplicate url’s in search engine results is what is known as duplicate content, which can penalize you in search engines. The url’s were being formatted like this.

http://www.example.com/pagename/comment-page-1/

Here is the original url.

http://www.example.com/pagename/

Both of these url’s were being indexed by Google. I immediately recognized that this could cause a problem with duplicate content, since the content of those pages are exactly the same. Searching my site, I noticed these url’s were being linked to from the Recent Comment widget in the sidebar.

A new feature in WordPress 2.7 is the pagination of comments. I’m not sure if this is turned on by default or not. Checking my options, I saw that this was turned on. Turning it off solved the problem. The widget now links to the normal url’s. The remaining issue is that duplicate url’s are now in the search results. To get rid of them, I added a line to my robots.txt file preventing them from being indexed. Within a few weeks, those duplicate url’s should be gone.

So if you are using WordPress 2.7, you should check your search engine results for these duplicate url’s. If it’s a problem, turning off comment pagination should fix it.

Nofollowing Your Categories in WordPress

I recently wrote a plugin to add the “nofollow” rel attribute to archive links in WordPress. I had a request to write a plugin that does the same thing for categories in WordPress, so I created one. This plugin allows you to display category links in your theme without giving them any pagerank value.

The Nofollow Categories page is here, and you can download the plugin here. I don’t recommend using them both at the same time. My recommendation is to use one or the other. You want to give pagerank to one or the other, but not both.

Remove Unwanted Tags From Your WordPress Header

The function wp_head; found in the header.php template file adds unnecessary tags to your WordPress template. These tags are the RSD, or Really Simple Discovery, link, the Windows Live Writer Link and the WordPress version number. I wanted to add this important function to my themes, but I don’t want those tags that WordPress adds by default.

So I created another WordPress plugin to strip these tags out. This plugin will stop all 3 tags from being automatically added to your WordPress header. The WordPress Head Cleaner page is here, and you can download the plugin here.

Nofollowing Your Archives in WordPress

I recently wrote my first WordPress plugin. I was looking for a way to add the “nofollow” rel attribute to archive links in WordPress. I needed to be able to use them in my theme without giving them any pagerank value.

I found that the best way to do it was to create a plugin so that I wouldn’t have to modify the core files. Any way the Nofollow Archives page is here, and you can download the plugin here.

Popularity Contest No Longer Supported, Use WordPress Popular Posts

Popularity Contest is a WordPress plugin that keeps a count of your post, category and archive views, comments, trackbacks, etc. and uses them to determine which of your posts are most popular. I have used it for almost as long as I have used WordPress, and it was a great plugin in its time. But it is time to declare it on life support at least, if not dead in the water.

The problem with Popularity Contest is that was last updated on Dec. 16th, 2007, and it is only compatible up to WordPress 2.3.1. The current version of WordPress is 2.7. If you have had Popularity Contest installed since then, the plugin functions fine. The problem is that it will no longer connect to the database for anything else other than to record information. If you try to reset values, which is a feature, it fails.

If you try to install it on a new version of WordPress, it fails because it will not create a new database, if one doesn’t already exist. You have to manually create the database on your own. Even then it may still have problems. Although there is a fix for those problems, there is no fix for the database connectivity problems other than manually modifying the database yourself.

As a result of these problems, I sought out a more current plugin that does the same thing. The plugin I found is called WordPress Popular Posts. I’ve been using it, and I am really satisifed with how it works. You can call it directly from your theme, or it has a widget, if your theme is widget enabled. It is also more configurable, but very simple to install. It does create a new table in your database, however, to track page views, but I had no problems with it. It uses the existing WordPress data for everything else.

I am continuing to use Popularity Contest where I already have it installed and it is working sufficiently. I am using it on this blog, in fact. But for any new installs, I am using WordPress Popular Posts. That is unless Popularity Contest ever gets updated to work with the current version of WordPress. If anyone else has abandoned it, I would like to hear what you are using instead.

Update: I’m so pleased with how WordPress Popular Posts works, I’m using it on all my sites now, and getting rid of Popularity Contest.

How to Transfer a Blog from WordPress.com

If you are thinking about setting up a blog, there are many good options out there. However, it is my opinion that WordPress is the best blogging platform currently available. It is also one of the most widely used due to its robust features, extendability and ease of use.

If you decide to use WordPress, there are 2 ways you can do it. You can use the free hosted version of WordPress.com, or you can host it yourself. Both versions have their pros and cons. Ideally, you want to host your own copy of WordPress to have the most flexibility. This is not for everyone though. If you are not up to the task of running your site yourself, the hosted version is the way to go.

Also, when you are starting out with a new blog, WordPress.com is a big help due to the automatic domain authority you get from having a subdomain of WordPress.com. This means you can instantly get good search engine rankings which drive traffic to your site. This is the main reason to set up a hosted version and quickly build up some decent traffic.

Let’s say that you do decide to go with WordPress.com. What happens if you one day want to host your blog yourself? In that case, it is possible to transfer your blog to your own hosted version of WordPress without losing any data or traffic.

The key to this is having your own domain. When you sign up for a WordPress.com blog, your blog address will be a subdomain of wordpress.com, as in yourblog.wordpress.com. What you want to do is buy your own domain name and point it at your WordPress.com blog. WordPress.com allows you to do this for $10 a year, plus the cost of your domain. This works no matter when you set it up because WordPress.com automatically redirects traffic from your wordpress.com subdomain to your custom domain, without having to do your own redirects.

Once your links and search engine results are pointing to your new domain, you should be able to transfer all your files to your new host. The second important part of this is importing all your WordPress data into your new custom WordPress setup. With WordPress, this is very simple to do, and it will keep your url’s the same on your new site as they were on your old site. This is critical to making this work. You will also want to keep the same template so that your site appears to change as little as possible.

After your files and data are transferred, you can point your domain back at your new host. Also, WordPress will redirect any traffic to your old blog to your new one as long as you have the custom domain active in your WordPress settings. It’s that simple!

WordPress.com Stats Plugin

You may or may not know that I use the WordPress blogging software for all my blogging needs. I really cannot say enough about the WordPress team and their blogging tool, not to mention the Askimet comment spam blocking tool. I would recommend WordPress to anyone looking to start blogging.

One of the nice features of WordPress is the openness of it and the plugins that are freely available. I have been looking for a good stats plugin for WordPress since I started using it. The one that I started using a few months ago no longer works with the latest WordPress version, 2.3.

I also use the WordPress.com platform for blogging, and the other day I was asking the question, why isn’t the WordPress.com stats software available for the non-hosted WordPress software. Since they already have the code, it seems like it would be easy to include in the standalone version of WordPress.

It turns out that it is available. After doing a little searching, I found the WordPress.com Stats plugin which looks like exactly what I asked for. I must say I am ecstatic over this. How often do you ask for something like that only to find it so soon? Anyway, I haven’t tested it yet, so I don’t know how well it works yet. But, if it works just like WordPress.com, it should be the only stats plugin that I need.

Update: It is not showing any stats as of yet. However, a quick look at the FAQ shows me that you need the tag <?php wp_footer(); ?> in your footer.php file. I have added that tag and hope to start seeing stats soon it is working.

Secure Contact Form for WordPress

I love wordpress, but one of the things it lacks is the ability to add a contact form. As a result, I have been looking for a way to easily add a contact form to wordpress. Today, I ran across this contact form plugin that seemed to be what I have been looking for.

It was created by Mike Cherim and Mike Jolley. It was a snap to install, and once I installed it, it works great. It requires a minimum of setup, and you will have a secure contact form running in no time at all. This is the wordpress contact form plugin you’ve been looking for.

It is secure in that it adds a CAPTCHA which prevents automated submissions to help combat spam. I recommend installing this today if you require this functionality on your blog. I am installing this on all of my sites that use wordpress. Dowload the plugin here and check out my contact form here.

Now if I can find a stats plugin for wordpress that would really rock!