The Menace of WordPress Theme Creep

One of the first topics I ever wrote about on WPShout, I kind of thought that the topic of “theme creep” had died long ago. But a few times in the last few months–once with someone I’m mentoring in WordPress development, once with someone who was asking how to buy themes–I felt a need to mention this idea. So I’m revising and updating the original essays.

I do think more and more actors in the WordPress ecosystem have “got religion” and are moving functionality into plugins. But it’s still not universal, and quite a few new developers have expressed to me how excited they are about the “everything theme” they’re building. For either of those cases, please consider why you should avoid what I first called “theme creep” back in 2013.

wordpress-logo-notext-rgbWordPress is great

WordPress is a great tool. If you need to run a basic CMS to get your words and images onto the internet, I’d never hesitate to suggest WordPress. It’ll make it really easy for you to get all that stuff online, and better yet, there are thousands of themes to choose from at every conceivable price point.

This functionality is core to the experience of WordPress. Jumping around from theme to theme without worrying what’ll happen to all your words is an amazing thing. Anyone who’s spent more than five minutes dealing with a static HTML site will rightly be impressed by this feature.

Themes are awesome, but…

But there’s a problem: a lot of WordPress themes break this magical flexibility. Either because of changes the user makes to a theme that was originally aligned with this vision of flexibility, or because the theme wasn’t designed with that flexibility in mind, on a lot of WordPress sites that flexibility has disappeared.

I’ve personally been responsible for ruining this flexibility on my own sites. functions.php is a really easy place to paste functionality snippets you find on the internet. It’s so easy it almost justifies the fact that you’ll lose that functionality when you switch themes.

Commercial themes, especially historically, have been even more guilty. On the outside they offer you immense power, and when you first use them, they seem to keep their promise. The heartbreak comes later, when you finally try to make a swap to a different WordPress theme and weird things happen. All your SEO data, well-crafted portfolio elements, and cool taxonomic structures may be gone. And some of your posts and pages are liable to have these weird [broken_shortcodes] inside of them.

why theme-specific shortcodes are a problemHmm, the site worked a minute ago…

That’s Theme Creep!

“Theme creep” is what I call it when functionality that has nothing to do with the presentational layer of a WordPress website “creeps” into the theme.

It’s what? “Theme creep” is what I call it when functionality that has nothing to do with the presentational layer of a WordPress website “creeps” into the theme. What this ends up doing is chaining you to a WordPress theme that seem great when first installed. It chains you so that in six months or thirty, when you find yourself wanting a visual change you’re left with a terrible choice: a changed look, or your properly functioning WordPress site.

WordPress themes shouldn’t include shortcodes. They shouldn’t provide SEO panels. They shouldn’t do ecommerce. They shouldn’t provide membership functionality. They shouldn’t create new content types in your site. They should look great, that’s all.

The Real Problem in Theme Creep: Too Much Resposibility

This sort of brittleness of systems typified by theme creep has been bedeviling software makers for almost as long as there’s been software. They’ve even developed some great ideas for preventing it and terminology for explaining it.

One of the most important ideas relevant to theme creep is called the single responsibility principle, which states that every component of a system should have exactly one responsibility and that that component should completely contain that responsibility. For WordPress themes, that would mean that they are only responsible for the visual layout and design of the site. They shouldn’t be responsible for registering data types, or providing for the display of post data in shortcodes, or anything else I’ve mentioned.

How WordPress Themes Should Work

When a WordPress site is working properly, themes can be easily swapped out and nothing is lost in the change. This is a direct manifestation of the single responsibility principle working. Themes only doing visual stuff keeps the system simple and flexible. Visual changes will obviously occur, but nothing other than the look of the site will be impacted, broken, or damaged as a result of a simple theme swap.

And for many themes from many providers, you can count on that promise of WordPress themes being kept.

But in the broader WordPress ecosystem, this single responsibility isn’t always the case. Users, professional developers, and theme sellers are eager to quickly add features without fully thinking through the future implications of the choices they’re making. This leads them to provide gobs of shortcodes and custom post types, even SEO features, that they shouldn’t have in their themes. Those functionalities — which are core to your site and unrelated to its current layout — aren’t things you should rely on any theme for.

How Theme Creep Finally Attacks

themecreepThey were warned about the Single Responsibility Principle, but they wouldn’t listen!

Initially, the problem is hidden from view, and so WordPress seems to be working better then ever for you. But when you go to change your theme and end up with missing data or a broken site, the true cost of the short-term thinking becomes clear.

Losing data when you change themes is a bummer of a problem, and one that shouldn’t be happening nearly as much as it is. I’ll grant than an expert can solve it pretty quickly because the data’s not truly destroyed (just hiding) but it’s a bad problem.

So beware of themes promising the world: unless you want to stick with that look for the entire life of your site, you should probably not rely on some of those features.

Dealing with WordPress Theme Creep

My presentation about theme creep at and WordCamp Boston in 2013 was great, and the event as whole was awesome. You can see the slides from my presentation, if you’re interested.

Theme creep is a form of technical debt. And technical debt is a problem because it makes a system — in this case, your website — fragile and harder to iteratively improve. Determining that you have the problem is one of the simpler steps you can take, so let’s start there.

Are you a victim of theme creep?

The easiest way to tell if theme creep is an issue on your site is to follow a simple procedure:

  1. Switch from your current theme to one that you know has no creep: I’d generally just recommend one of the Twenty * series, the most recent of which is Twenty Seventeen, and boutique shops like Pro Theme Design are often good too. Out of the box, these default themes are do nothing from my list of the four things a WordPress theme shouldn’t do.
  2. Once running, go through the front and back of your site looking for things that are broken or missing. That FAQ page is gone? Some posts have broken shortcodes in them? You’re extra taxonomies are missing? Your SEO data isn’t visible to Google? Theme creep got you.

Now that you know you’ve got a problem problem, what do you do?

Remediating Against Theme Creep

10540961966_e0039057a4_oTo be clear, theme creep isn’t a devastating problem. It can be dealt with relatively easily and productively. The simple problem is that functionality that your sites need always was conflated with the visual appearance of your site today. When you separate out those concerns, your site will be set to move into the future. If you’re not technical, you may need a bit of help implementing these steps, but it’s not too hard. Here are your basic options:

  • Make an “everything plugin.” This is pretty simple if you know only the smallest bit of PHP. Take the entirety of your theme’s functions.php and put it inside a new plugin. If you’ve never created a plugin before but are interested in trying, I recommend my “Minimum Viable WordPress Plugin” post from a few months back. This plugin probably won’t be able to run side-by-side with your creepy theme — PHP will probably yell at you — but when you’re on a different theme you may well be able to run that side-by-side with you new theme and have everything working. If not, you’ll want to see if your theme is require()-ing or include()-ing other files and bring those over as well. (Either by pasting them in a single plugin file or into unique files as they were in the theme.)
  • A somewhat better option is to create a plugin for each type of functionality your theme used to do that you now need outside of your theme. This is a better idea overall — you’ll end up with a more modular and flexible WordPress site — but does require a bit of thinking about each bit’s purpose and a real understanding of how PHP works. Your custom post types like FAQs should be a plugin, your site’s shortcodes should be a plugin, etc.
  • Finally, opt-out from WordPress themes that are creepy. Favor vendors that enforce strong standards with respect to what a theme should do. You get a future-friendly WordPress theme with proven support that won’t weight you down in the future.

As a theme maker or coder, there is more you can do. I’ll not write too much about it here, but TGM Plugin Activiation is a great library and highly recommended if you’re in the position of needing to provide functionality in a theme you’re distributing or selling by know shouldn’t really be in the theme. For marketing reasons, theme seller often fine it useful to “oversell.” And if you “oversell”–advertise your theme using non-theme features–I’m not to upset if you offer the plugins for the features you’ve oversold.

What We’ve Learned

I hope you now have some understanding of this issue that unintentionally infects too many WordPress sites. “Theme creep” isn’t the end of the world, it’s just an annoying and not-helpful entanglement of your theme and actual site functionality. There are ways you can combat it, easily, if you’re a developer. The most important thing is to stay on the look out. Don’t put to much into a theme, and discourse others from doing the same.

Image credit: weeklydig


27 Responses

Comments

  • Mike says:

    I recently read Justin’s post about the features of a theme needing to be put into plugins so the end user can switch out themes without losing content and this post reinforces that perfectly.

    It’s one of the reasons a theme I’m working on to release for sale is going to utilize Justin’s custom post type plugin because if a person who uses my theme ends up wanting to switch out 6 months to a year later, I don’t think they should lost all of their portfolio content, or even worse, have to pay someone extra to extract the codes and recode them into the new theme in order for them to work.

    As more theme developers make use of plugins like that and others, the end user will benefit from a larger selection of themes that they can bounce around to whenever they feel like it. As it stands now, most theme developers are essentially holding the users content ransom and that’s never a good thing.

  • This is the first clear exposition on this that I’ve read; I’m fairly new to WordPress, but it was something I was shocked by in coming across from Drupal, which has a much clearer distinction between data and presentation. The other thing that surprised me was the shrug of the shoulders people much more experienced in WordPress gave when I expressed my surprise. They were very much resigned to this state of affairs.

    Part of the issue to me seems to be a lack of clarity in the way things are marketed. To me, the phrase ‘Premium Theme’ has become code word for ‘tightly coupled package of data types and presentation layer that you will never be able to unpick’; if people used a term that better described what they were marketing, then end users might have a better idea what they were in for.

    Some of the blame must rest with WordPress’ structure. Allowing a presentation layer package (the theme) to define elements that live outside that core responsibility (custom post types etc) seems to me to be half the issue. If WordPress forced developers to separate the two into independant part, when packaging their theme, a lot of the mess would be avoided.

    A suggestion for a post: what tools can you use to unpick the Gordian Knot of a ‘premium theme’? Types (http://wordpress.org/plugins/types/) springs to mind, what others are there?

  • I attended your talk on Theme Creep last October in Boston, and it taught me a ton. I’m actually speaking on WordPress themes for a local WP group, and I borrowed your term – it really describes the issue perfectly. I’ll link to this post in my presentation. (:

  • Najpress says:

    I use the Advanced Custom Fields plugin a lot. I create the fields in the backend and output them by adding the fields to templates in the theme.

    If I follow your rules on theme creep would this mean no longer using this (or any similar) plugin ?

    • Hubert says:

      I have exactly the same question about beaver-builder… is that creep?

      • Fred Meyer Fred Meyer says:

        Hi both, thanks for the questions! Neither use you described is an example of theme creep.

        ACF is a plugin that registers new types of post data. If you change themes, the data is still accessible: only the presentation of that data—how it outputs onto various types of page templates—has changed, and presentation is exactly what a theme should control. So registering new data through a plugin, and controlling the display of that data through a theme, is the correct way to use WordPress—it’s the opposite of theme creep.

        Beaver Builder is a plugin for layout creation. It’s very “presentational,” so you can think of it as extending a theme’s job if you like. (A number of plugins have similarly presentational roles, such as Easy Google Fonts.) Plugins that do presentation do have a potential problem: they can lock you into using the plugin, or else all your layouts break. That “lock-in effect” can be a real problem, especially if your plugin is really bad, like WPBakery Builder. But it’s kind of the inverse problem of what we mean by theme creep: getting locked into a plugin because it controls your presentation, versus theme creep, which is getting locked into a theme because it controls your data.

        The only additional thing I’d say about this is that WordPress is supposed to work if you change the theme and keep the plugins the same. The opposite (ditch the plugins, keep the theme, expect the site to keep working) is not true. So theme creep more directly contradicts what WordPress should be than does getting a site “hooked” on a very useful plugin like Beaver Builder, Easy Google Fonts, or for that matter WooCommerce.

        Hope that helps!

        • Najpress says:

          Thanks for your detailed reply – I am reassured 🙂

          • Najpress says:

            Oh hang on I’ve just re-read the entire post.

            One of your test cases for theme-creep is to switch the site to e.g. Twenty Seventeen theme and see if any content is missing.

            If I do that on one of my sites, yes, a lot of content is missing.

            Why? Because page templates within my theme are marked up to output Advanced Custom Fields. Unless the same markup is applied to templates within the WP 2018 theme the content will remain invisible.

            How then is this NOT theme-creep?

            (I’m hoping you can persuade me that it’s not!)

    • No, I don’t think so. ACF works at the data layer of the app. You will always need something in the presentation layer to render that custom data.

      When the suggestion is made to switch to a default theme and see what disappears, I think you should test this in the *admin backend*. If content types disappear, for instance, you’ve got things defined in your theme that probably shouldn’t be there.

      PS can’t believe I got an email ping on this post; my comment above was 5 years ago 😉

  • Najpress says:

    Sorry – correction in my last paragraph – should say ‘Twenty Seventeen theme’ and not ‘WP 2018 theme’.

Pingbacks

Add a Comment

Your email address will not be published. Required fields are marked *