Web, Mobile, and Branding.

Based in Charlottesville, Virginia.
Recent Tweets @BusinessBullpen
Posts We Like
Who We Follow

As a developer, I’ve always been an advocate of using existing tools/plugins/components when they are cost effective. Why spend two days reinventing a wheel that you can download for free or a nominal fee? Since joining Business Bullpen in the spring, I’ve been getting my feet wet with several WordPress sites for clients, and obviously there is a seemingly endless library of free plugins at your disposal for WP. Most of the plugin installs and configurations I’ve been through have gone fairly smoothly. Recently, however, I was forced with the decision of continuing to bang my head against the wall trying to figure out why several plugins weren’t working as advertised or go ahead and write the code myself to do the job.

Our client wanted to reuse the content from their WordPress site on their Facebook page, so I researched and discovered that there were several WP plugins for switching themes dynamically based on a match against the URL (i.e., “http://businessbullpen.com/contact/ for the default theme, and http://businessbullpen.com/contact/?facebook=1 or something similar for the alternate theme). However, when it came to actually getting the plugins to work, I wasn’t so lucky, and I probably wasted a few hours trying to mess with configurations, uninstalling and reinstalling, Googling for solutions, etc. SO … I found a snippet of code online to check a query string and switch themes dynamically, but the catch was that this code could ONLY be placed within a plugin. Long story short: 12 lines of code and a hand-rolled plugin install later, I was off to the races.

Now, sure I have to maintain the plugin, but I also have the confidence that I know exactly what the code is doing and if there are any issues with it, I’ll know exactly how to proceed. Sometimes it really does make sense to (re-)write it yourself.

Posted by Brian Chenault, developer for Business Bullpen. You can follow Brian on Tumblr or Twitter.

  1. espectaculos reblogged this from businessbullpen
  2. businessbullpen posted this