Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

This question already has an answer here:

If I am customizing a WordPress site, should I do that via a theme or a plugin? By customization I mean:

  1. Add new custom post type
  2. Add new fields to the Users
  3. Add new widgets
  4. Add custom permalinks

I am leaning to creating new plugins for the above, and leave the theme for styling, however I wanted to confirm if this is the right approach.


share|improve this question

marked as duplicate by toscho Feb 4 '14 at 20:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

My answer is here as you asked some different questions which aren't duplicates wordpress.stackexchange.com/a/133443/9884 –  Brad Dalton Feb 4 '14 at 21:05

1 Answer 1

Yes, the types of customizations you are enumerating are persistent to the site, regardless of theme changes. They are indeed commonly recommended to be contained in a plugin.

Personally I consider there is exception from the rule when theme is uniquely developed to the site and de-facto is site project. However I am tad in minority about it and most people insist on plugin approach even in that case.

share|improve this answer
I am going back and forth on that and hence asked the question. Yes it is for a custom site. However, I am just thinking it may be easier to seperate everything, even to more than one plugin, so that coding would be easier as it looks like a number of small projects. –  Greeso Feb 4 '14 at 21:55
@Greeso if you are writing modern PHP code with proper classes and namespaces you do not need plugin as a level of code organization. It just gets in the way because you need to depend things on multiple plugins being enabled and WP doesn't do that natively/well. –  Rarst Feb 4 '14 at 23:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.