Skip to main content

Engineering Retrospective

Theming CodeIgniter like WordPress: a 2014 approach

A brief 2014 note from our engineering team: how to give a CodeIgniter application WordPress-style switchable themes using a community template library. The technique is historical; the idea — separating an application from its skin — is not.

By Sanjay Shrestha Published Substantially revised 3 min read

Historical technique. This is a historical engineering retrospective from 2014. CodeIgniter 2-era techniques shown here are not current implementation guidance. The source article was brief, and this preservation deliberately does not pad it. FINAL-OWNER-REVIEW.

The idea: themes outside the framework

WordPress’s most copied feature has never been its editor — it is the theme: the ability to swap a site’s entire presentation without touching its logic. CodeIgniter, the lean PHP MVC framework our practice used through the mid-2010s (including on Swilcanbids and Chasebid), shipped with no such concept. This 2014 note recorded the team’s recipe for adding one.

The 2014 recipe

The approach used a community template library dropped into CodeIgniter’s libraries folder, then bent to WordPress-style conventions:

  1. Install the template library (template.php) into application/libraries.
  2. Edit the library’s view path so it resolves views from a theme directory rather than the default views folder.
  3. Create a named theme folder under application/views — one folder per theme, WordPress-fashion.
  4. Render pages through the template library, so switching the active theme name switches the whole skin.
Code before editing: the template library's default view path Code after editing: the view path pointed at the active theme folder
The path edit at the heart of the technique — before and after (original 2014 screenshots).

A 2026 note

Present-day editorial perspective.

CodeIgniter’s era in our stack has passed, and modern frameworks ship template inheritance and component systems that make this recipe unnecessary. What the note preserves is the instinct, which still earns its keep: presentation should be a replaceable layer. The same separation that let a 2014 CodeIgniter app change its skin is what lets today’s platforms support white-labelling and multi-tenant branding — a requirement in most of the SaaS products we now build.