Archives

October 2010

WordPress Pagination

Hardpressed No Comments

WOW! I’ve been having a pain in the ass time getting pagination to work on WordPress. First off, I don’t want to use wp-pagenavi or some other plugin. I hate plugins, I would rather have my plugin running on one clean install and nothing else.

LET’S GET STARTED. This is like Pagination made super simple, seriously. I’ve taken out all the work.

Step One:
Ok, step one. Paste this code into your functions.php file. It sets up the $pagination variable for us.
(more…)

WordPress Sessions and Captcha

Hardpressed No Comments

Tonights project: Installing captcha onto a wordpress contact form.

Step One:
So the first thing that I’m going to do is locate a captcha script that I can use as my base. I found this quick little script, looks simple enough: http://www.encaps.net/software/php-captcha/

Note: Make sure that you copy the captcha.jpg image to your website and then set the correct path.

Now let’s go ahead and create the image file. I’m going to call mine captcha-image.php. First things first, get the image loading when you call your script directly. Once you’re ready, proceed to step two.
(more…)