WordPress Theme refactoring… the quicker way

This theme was made by refactoring the new WordPress 3.0 TwentyTen ‘factory’ theme.
By refactoring, I mostly mean restyling the look and feel of the original via the CSS.

From our experience, the easiest way to go about this is not to try to redo the exiting CSS, but to add new CSS statements at the end of the existing CSS file, thus “overriding” sections of the ‘factory’ theme. Use !important as needed to resolve any conflicts. This is particulary true of a theme like TwentyTen which has a rather large and complex CSS to start with.

Granted, this approach is somewhat sloppy as it adds to the CSS, but the shortened time to production is worth it… and you can go and clean the “up stream” css statements that are no longer in effect at your leisure once your new look is stable, without affecting the site.

If you want to keep the original theme intact for future use, then simply copy the whole theme folder under a new name – a good choice being the name of the site to which it will apply -, edit that theme and apply it to your site. You might want to

  • overwrite the screenshot.png file with a scaled snapshot of your new theme view, and
  • modify the header of the style.css page to contain the name of your new theme

…so your theme dashboard page does not show twice the same theme – and have you gessing which is the new and which is the original.

This entry was posted in Technical and tagged , . Bookmark the permalink.

Comments are closed.