Archive for the ‘Development’ Category

Code to Share: Random WP Post Loader

Haven’t posted in a while and after getting a warning in my email about my blog not being active and set to be deleted I felt like a post was overdue.

I’ve been messing around with my own site for a while now and although it’s still a work-in-progress, it gets the point across. My favorite part about the site is the random “AJAX-ified” blog post loader. I’ve attached the code so feel free to install it on your own site or run it on your local machine for kicks.

It’s only three files (one of which is a loader GIF) plus a “readme” file.  All together it’s less than 60 lines of code (not counting the jQuery include), but it gets the job done.

Let me know if you need help getting it to run. Also, maybe someone would like to make it into a WordPress plugin…

UPDATE:

I refactored the code. You can get the new and improved version random-ajax-post-loader.