Hacker News new | past | comments | ask | show | jobs | submit login

Plugin functionality can be coded into the theme itself. Unless it isn't 'custom' that is. Then there is a plugins folder.



Themes should only be used as templates. Functionality for the most part belongs in plugins.


Thats a pretty bold statement. Kind of curious the reasoning


I guess I view this separation as an adaption of The Single Responsibility Principle. This is how I view themes & plugins, and their relationship. Your theme is used to display your site, it's navigation, content, it controls the markup browsers see.

Plugins are for adding functionality to your site, if you want a sitemap, there's a plugin for that. Not happy with your current sitemap? Install/Create a new plugin, replacing the old one. If your sitemap isn't working, where do you look? Your sitemap plugin's code.

The importance of having this separation of tasks, removes a lot of risks too in my opinion. If your site isn't working instead of risking having to change your theme, you can deactivate the troublesome plugin. Albeit finding the offending may be difficult, but at least you're not changing the total design of your site.

Hence why I believe in plugins and themes having distinct tasks. It really helped me organise the development, and maintenance of sites.

Here's a pretty decent setup for using git with WordPress too. https://github.com/markjaquith/WordPress-Skeleton

http://en.wikipedia.org/wiki/Single_responsibility_principle


This is why I love HN. Such an in-depth smart response. Really making me rethink how I build on WP. Thank you


First time I've contributed something of value on here. Thanks!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: