Making Custom Theme Options Easy

Toby Mckes, a WordPress devel­oper at I Can Has Cheezburber, gave the sec­ond talk at WordCamp Developers on the theme options pan­els their sites use. CheezCAP is the cus­tom theme options panel they’ve open sourced.

Cheezburger runs over 50 sites on WordPress.com VIP. CheezCAP, which stands for Cheezburger Custom Administration Panel, makes their deploy­ment process for themes really simple.

Background

The inter­net is a series of tubes filled with cats. Toby started on the farm team at Cheezburber where they were putting out many sites every week. The goal was “OMG moar sites plz.”

Their ini­tial theme deploy­ment process was ter­ri­ble. Toby had to spend half his time as a server admin. On Thanksgiving 2009 one of their sites was posted to the Guardian UK and hit 700,000 pageviews. He got to spend his Thanksgiving reboot­ing the server.

They also didn’t have ver­sion con­trol. There was no way of track­ing what was being changed and many sites were hacked together to the point of look­ing pretty bad. It was easy to make new sites but dif­fi­cult to update and main­tain them. They switched to a uni­fied theme on WordPress.com.

Early on they had 10 sites run­ning this uni­fied theme and one file which con­tained all of the cus­tomiza­tion options for the sites. CheezCAP was the solu­tion to make this easier.

CheezCAP

Licensed under the GPL v2 CheezCAP adds an options panel to make cus­tomiza­tion easy. There’s a pre-configured con­fig file that you can cus­tomize to your lik­ing. Its core con­tains a few key aspects:

  • Boolean options cre­ate as basic tog­gle switches.
  • Text options can rep­re­sent alphanu­meric strings to be inserted.
  • Dropdown options serve as more com­plex options.
  • User caps to limit edit­ing abil­ity to spe­cific user roles.

All of this goes right into your Dashboard and lets you get new sites set up and run­ning with cus­tom options that require minor con­fig­u­ra­tion changes. Google Analytics inte­gra­tion, A/B test­ing, cus­tom 404 pages, and much more can all be con­fig­ured with CheezCAP.

The killer fea­ture of all this is import/export. All of these options can be exported from one site and seam­lessly imported into a new site. Setting up devel­op­ment sites is super easy using this.

Update: Toby gave a sim­i­lar talk at WordCamp Seattle and will be updat­ing the slides from that talk.