WordPress

In WordPress, as with many things, there are two ways to add features and customise your website, either with themes (php template files) or plugins.  There are multiple threads about what’s the difference between a theme and a plugin. A plugin ‘should not’ change your website design / look and feel - But a theme can do everything a plugin does (including installing other plugins). 

Difference between a plugin and a theme

To make things sound simple … Primarily, a plugin gives you the user, fine control via the shortcode as to when my plugin function is activated, and of course you can just turn off the plugin at any time.  You can’t do that with a theme.

So what is a plugin that includes design & HTML elements?

My WordPress plugins fall into what I’d like to call a ‘middle ground’ - I don’t create plugins that mean you need to add code to your theme and page templates.  - But I do include jQuery, HTML & CSS in my plugins. I deliberately wanted to make plugins that add to your site without the need to change your theme. For many people I speak too, they love their theme, they just want added features.

It is possible, to develop a plugin which moves page templates from the plugin into your theme folder - but it does become difficult to maintain these - what happens if you tried to change your theme? The plugin would break 🙁

WordPress themes that include plugins

A few WordPress theme developers are now including default plugins which get installed when the theme gets installed. This sounds like a good idea, because

  1. The developer can add more features without coding by using existing plugins

  2. The user should be able to turn off plugins they don’t want

  3. The developer can separate the design from the ‘code’

Actually, the last point is not true at all … the Developer wants to install plugins to include their functionality in the theme they are designing. So in away, the developer is just adding prerequisites before the theme can be used.

 

WordPress plugins are not dependent on any theme

The key benefit of a plugin, is building something independent, which can run on any number of themes. In my experience, you have the potential of getting all WordPress users to use your plugin (Hello Dolly, anyone?) - but you’re less likely to convince someone to change their theme as easily.

Aside from that, WordPress plugins can be just 2 files in a folder - the main plugin.php and its readme.txt file … a theme is likely to have 20 - 30 files. This also gives a bit of an indication about testing and a plugin vs testing a theme.

 

So i’ll carry making plugins for now 🙂

 

 

 

Tags: development, plugins, theme, website, WordPress

Read more from my blog for an introduction and quick tips on developing in Hugo or UCTD.

Meet the author

Photo for Damien Saunders
Damien Saunders
An experienced management consultant and business leader interested in digital transformation, product centred design and scaled agile. If I'm not writing about living with UCTD (an autoimmune disease), I'm probably listening to music, reading a book or learning more about wine.
Find our more about me.