Ajax Comments — How I did It

Ajax

One of the first questions asked of me was to make this into a plugin. Packaging this up as a plugin will be tough because it requires some detailed additions to your theme. You have to add javascript includes to your header file, you have to heavily modify the ‘form’ tag on the comments page, as well as add error and loading divs. Not to mention, the solution requires that your comments be inside ‘ol’ tags. That’s a recipe for disaster as a plugin and a support nightmare. The best I can do is offer the files for download and explain how I got it working and the rest is up to you.

Step 1: Download the squible theme and grab the following files:

ajax_comments.php
scripts/ (directory contains ajax_comments.js prototype.js and effects.js)

Step 2: Put these files in your theme directory:

wp-content/themes/yourtheme/ajax_comments.php
wp-content/themes/yourtheme/scripts/

Step 3: Add this code to your header.php file:

Ajax Comments — How I did It

Leave a Reply

Your email address will not be published. Required fields are marked *