Best Practices for Changing your WordPress Theme

Have you ever tried to change your theme and noticed that everything just falls apart?

This is especially true if you’ve been blogging for any length of time. The more content, plugins, image sizes, and media that you have nicely formatted, the more chance that it will promptly unformat as soon as a new theme is installed.

This post will show you how to future proof your content. If you follow these best practices your content will be safe and secure while you switch around your themes.

Use Child Themes

If there was one reason that convinced bloggers to switch to a ‘framework’ like Genesis, this is it! Let me explain. Themes are made of two parts: code and styles. A framework separates the two: the framework holds the code and the child theme holds the styles.

If you’ve ever upgraded your theme and lost all your beautiful style changes – you understand how important the separation is! With a framework and child theme, you can upgrade your code without all your styles breaking.

Universal Image Uploads

Because of speed, lots of advice has been out there to load small images – or at least as small as your theme needs. This is really short sighted – what happens when you want to switch up your theme?

What about next year when all the devices we use have retina displays (or bettter)? What about when the internet is faster and size isn’t an issue any longer?

Our definitive guide to the right image size.

For these reasons, I recommend uploading your photos in 2000px wide and whatever tall. Your theme will automatically chop them up to size. Not displaying correctly? See this guide to image cropping to figure out the issue.

Avoid Additional Shortcodes

Shortcodes are short tags that signal an instruction to WordPress. They are designed to help bloggers who don’t know HTML. These shortcodes are included in WordPress:

  • [[ audio]]
  • [[ caption]]
  • [[ embed]]
  • [[ gallery]]
  • [[ playlist]]
  • [[ video]]

Do not use any other shortcodes. If your theme comes with shortcodes – do not use them! If you do, and you switch themes, you will be left with square nonsensical brackets and words all over the place.

If you are using a plugin that supplies shortcodes those are safe to use as long as you never ever ever ever de-activate the plugin. That means you trust that plugin author to continue to maintain that plugin until you’re done with your website. Period.

Or redo all your content.

Custom Post Types & Theme Goodies

If your theme comes with calendars, built-in sliders, portfolios and other goodies then you will have a difficult time switching to another theme. It’s best practice to keep these items in a theme independent plugin. Then you’re free to switch themes without it affecting all the special content on your site.

NOTE about plugins: if you’ve known me for any length of time, you know that I have this love/hate relationship with plugins. Of course they’re fabulous and everyone loves the little nuggets of goodness. The problem is that they’re little nuggets of coded goodness. Which means that if the author is nefarious or ignorant, you can end up with viruses in your site. And you let them in!

However, a theme-independent plugin for all the custom ‘goodies’ on your site is best practices.