2. How to Hack Ugly WordPress Next and Previous Links

Since you probably own a WordPress blog, I’m sure you already know about the default << Next and >>Previous links at the bottom of each and every WordPress powered home page. This was a great conceptual idea (allowing people browse through your posts) but not at all what they expect. If you have say, 100 posts, users expect to browse through them like browsing google. I want links to page 2, 3, 4, and 5, with options to jump to the end, the next 5, or back again. Otherwise with default WordPress next and previous links, to get to “page 5” I have to click and actually load 5 pages. That’s either going to make me leave your blog pretty quick, and keep a lot of users from getting to a lot of your content.

Lester Chan has a plugin I’ve written about before (and use) called WP-PageNavi that does exactly what I just described. It displays a google style navigation like this:

example page navigation

I’ve been very happy with that so far, and you can style the output any way you wish using the plugin’s stylesheet. However, today I did find a plugin that is slightly better that’s called WP-Page Numbers. It’s better because it gives you 5 great style options out of the box that you can choose (so it’s prettier!) – and if you like one you don’t have to spend your time hacking WP-PageNavi’s stylesheet. Here are the options it has to choose from:

wp page numbers wordpress plugin example themes

The nice thing about this plugin is that you can choose to use one of the included themes, or point to your own theme folder with your style. There are also a lot of other miscellaneous options as well. I’ve switched to this plugin on the homepage now, but haven’t updated my other template pages just yet. You will want to update the following pages (if you have them) with this new pagination navigation: index.php, archive.php, category.php, tag.php, or any other template that gets 10 posts at a time from using the loop. Go to the next hack below…