When coding a WordPress theme, where does the theme (i.e. the presentation) end and the plugin (i.e. the functionality) begin?

I would say that one line would be presention versus creation of content.

It is one thing to have a slider that displays certain posts; it is another entirely to have a new post type for the slider. A slider can be set to display content based on existing taxonomies, or existing post meta (such as sticky posts), which would merely be presentation of content. Asking the user to upload slider images to a custom post type would be creation of content.

A shortcode that gets added to the post content is, IMHO, always Plugin territory. In terms of presentation versus creation of content, a post-content shortcode represents creation of content. Consider what happens when the Theme is switched: suddenly the parsed shortcode content is replaced with an ugly shortcode.

Another line is site functionality. In almost all cases, site functionality – which almost always is agnostic toward the presentation of content – is Plugin territory. This would include things like removing the WordPress version meta tag, or adding Google Analytics.

Leave a Comment