WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 was marked as an exact duplicate of an existing 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

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.