One Option to Rule Them All!


Recently I attended a St. Louis WordPress meetup and Chris suggested using one option in the WordPress options table instead of multiple options. At first, that didn’t make much sense to me, but now it does – think database hits. If I have 10 options in my theme or plugin, that’s 10 separate queries to the database. Or, I can define one option, using it as an array, and call it on page load storing it as a global variable.

It makes lots of sense now!