Category Archives: Tutorials

July 4, 2011

Picking apart XML feeds and namespaces with PHP and SimpleXML

I love parsing XML feeds in PHP. It makes virtually anything that has an RSS or Atom feed completely accessible to my programming. YouTube video feeds, blog feeds, even Facebook Walls. I’ve used SimplePie a lot to make combined social media feeds at work, and SimplePie provides a pretty simple way to access data from [...]

June 30, 2011

Show a user’s order history on “My Account” in Cart66

This isn’t a full tutorial, just some code for people to use. I’m working on a site that’s using Cart66 for their online store. Unfortunately, Cart66 doesn’t come with a function or shortcode for displaying a logged-in user’s purchase history. I made a somewhat comprehensive “My Account” page that does just that.

April 24, 2011

WordPress Settings API Tutorial Follow-Up

I received a lot of feedback on my Settings API tutorial (thank you so much!) and a few people found some bugs. There was also confusion on how to reference these options in the theme. Well, I have an updated class file and answers to your questions in this post!

January 1, 2011

Extended WordPress Settings API Tutorial, Part 2

[toc type=bullets levels=3-6] Download the files (updated June 5, 2011) This post is based on part 1 of this tutorial, so read it if you haven’t. We left off with a theme options class, My_Theme_Options, that had all the behind-the-scenes work complete. The next step is the HTML.

January 1, 2011

Extended WordPress Settings API Tutorial, Part 1

[toc type=bullets levels=3] The WordPress Settings API has been around for a little while, but I haven’t used it until now. I highly recommend it. It does a lot of work for you and is still flexible enough to create custom-styled options pages (with a little jQuery). Once you’re done with this tutorial, this is [...]

June 5, 2009

PHP code for exporting a MySQL table to a CSV file

After a lot of searching, and a lot of troubleshooting, I finally found PHP code for exporting a CSV file from MySQL that works perfectly! This might be old news to some, but I’d never done it before and I needed to have that export feature on my Store Locator plugin. $result = mysql_query(“SHOW COLUMNS [...]