Checklist Of Things To Do Before Switching Themes

Great checklist created by WPBeginner of things to do before switching to a different theme. Out of everything they presented, number three hit home for me. After using a new theme for a few months, I decided to look at my Google Analytics and discovered that no stats were being saved from the date I switched my theme to the present. I obviously forgot to add the tracking code to the new theme. OOPS.


  1. That’s why Theme-agnostic functionality such as tracking code should be added as a Plugin, rather than as part of the Theme, as well as why Themes should generally limit themselves to presentational, rather than functional, code.


  2. I use Yoast’s plugin for Google Analytics, that way I don’t have to even think about adding it to the new theme


  3. @Ipstenu

    Where do CPTs fall in?

    Plugins. ;)

    Or, custom/niche Themes – or, a stand-alone Plugin mated to built-in Theme functionality.

    Honestly, if one is using Custom Post Types, then this discussion by-and-large will not apply, since the CPTs will almost assuredly have been implemented via custom, client development.


  4. I just have a plugin file where I drop all the code I normally would have dropped into the theme’s functions.php file :)


Comments are closed.