I’m currently working on a client project built using WordPress that involves a number of custom templates and some custom database tables. I have a few pages where I need to show client records in table form with navigation through through the results (previous, next, jump to record X, etc.). As I was about to start coding up a class to handle it I thankfully did a quick Google search first and found: http://www.catchmyfame.com/2007/07/28/finally-the-simple-pagination-class/
The one file class allows you to easily paginate any database results with all of the above navigation options. Integrating it into WordPress was a matter of tweaking the URL parameters it was based on. With that done I simply included the class in a custom plugin I’m writing for this project, declared a new global instance of the paginator class (so that I could access it on my templates) and that was it, all set.
I’ve attached the modified file as a download. The original site has great instructions on how to use it as well. The section of the site where I’m using it isn’t publicly accessible but I’ll stick a demo up here shortly showing how to use it in WordPress.Downloaded 311 times