Clean Up Orphaned postmeta Data

Sometimes you run into a time where you need to go into the database and delete items from the posts table.  So after doing this you could have a lot of extra data getting stored in the postmeta table that is no longer needed.  This is a simple MySQL command that can...

Color Inverter

I found this nice little function to take a color and give you its inverse color.  It is pretty useful to display a color on a background that is opposite so you can ensure it will display correctly without having to know what the color is. <?php // color_inverse...

Create CSV File using PHP

Came across this nice little bit of code to write a CSV file on the fly using PHP and grabbing the data from a MySQL database.  Thank you Stephen Morley for authoring a great little how to. // output headers so that the file is downloaded rather than displayed...

Creating a Testimonial System using WordPress Creation Kit

First step is to create the Post Type under the Post Type Creator.  Under Supports: you should only leave title checked off.  For post_type in the example I am giving I used ‘wpcmsninja_reviews’ but you can set this to whatever you would like, just need to...

Cron Jobs and WordPress

Occasionally you find the need to have scheduled tasks run in WordPress. Ideally this should be done using WordPress Cron which allows you to tie in with visits to the website as to things being run periodically. The main commands that you will be needing are the...