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.

The best guideline I have seen for what should be in a theme is to put "functionality" in a plugin.

I am looking at adding more "premium features" like jQuery image sliders. This requires a back-end user interface for selecting featured content to slide. Is this presentation?

How about shortcodes? A shortcode is a simple hook that enables you to call a PHP function by adding something such as [shortcode] to a post or page. I see this in themes all the time. Is it presentation?

I am unable to sort it out!

share|improve this question
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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