The weekend arrives, and as always, it’s time to review a basic concept of WordPress. Today we will see the difference between WordPress themes and plugins, what is the role that each one should play, and the role that a theme should NEVER play.
Themes (themes, templates)
The themes have the mission of dressing with style (styles) our WordPress, that is, to make it beautiful at different levels: structure and attributes. Let’s see what each thing is:
Structure: We speak of structure when we refer to the location of things. That is, where each element goes: The header, the content, the text, the sidebar (if it exists), the menu, etc. To understand each other, it is the scheme that distributes what in the code are called “divs”, which would be the sections that make up the page. Here we can choose where everything goes and in what order. If we want to show the featured image before or after the title, or the categories, or the share buttons, etc.
Attributes: Once we have the “layout”, that is, the arrangement made, we can go into more detail, to format each of the elements that make it up: Font, size, alignment, space between paragraphs, colors, backgrounds, margins, etc. That can be specified element by element.
Important: On a website there can only be a theme active.
Plugins (add-ons, extensions)
The plugins have little to do with the style of the page, since their function is to add functionality to WordPress. In other words, make it do something new that it didn’t do “out of the box”. For example, sell products. It is clear that WordPress does not do this function, if we do not add any plugin for it, such as WooCommerce. That plugin is adding to it, adding a new functionality.
Obviously, when a plugin adds something to the front end (what the user sees, that is, the web), you have to style it a bit to make it look relatively “nice”, which is why many plugins have their own styles. But if the developer has done it right, they should always be able to be overridden so that the theme uses their specific ones.
Important: On a website there may be multiple active plugins
With that said, we move on to the key point of this article. What should NOT have a theme, theme template?
What a theme should NOT have
I suppose that at this point you have it more than clear. A theme should NEVER have functionalities, since that is a matter of the plugins. Therefore, be very careful with those themes that say they have “everything”, because they are the most dangerous. Some examples would be:
- Frequent questions
- Even eCommerce!
Nobody in their right mind would think of having an eCommerce linked to a theme. Why? Well, basically because he is in tremendous danger. If at any time you want to change the theme… you lose everything. Let’s see a video in which this concept is very clear:
I suppose the danger of depending on the functionalities of a theme is clear. Just like what happens in Vegas stays in Vegas, what happens in a theme stays in the theme. And since we can only have one active theme, the moment we change the theme, all those wonderful features disappear. Solution? Use plugins! If we do it through plugins, we can change the theme as many times as we want without problems, because the plugins “stay there” even if we are constantly modifying our theme 🙂
When you choose a theme, make it purely for the design, but not for the functionalities. The best thing would be to always use themes that do NOT have a single one, but that come prepared with the styles and CSS of the main WordPress plugins (WooCommerce, Jetpack, bbPress, etc.). And for that it is key to stay away from .
Anyway, so far the bricosejo on Saturday. More tomorrow. And you already know that if you want to know more, you have at your disposal the , in which I tell this and much more. In fact, there’s even a tutorial to learn how to create and modify your own plugins, from scratch 😉