[theme-reviewers] Shortcodes

Bruce Wampler weavertheme at gmail.com
Fri Feb 17 19:26:44 UTC 2012


My theme has a number of shortcodes (which are prefixed with the theme
slug).

Some are convenience shortcodes, and likely could be easily replaced by a
pure plugin.

Others, however, probably could be considered content creation (selectively
displaying posts, YouTube content). But the thing is, these are included
because no other similar plugin or support exists (yes, even YouTube
display shortcodes) that will properly display that content in the theme.
For example, there really is no other way to correctly display posts via a
shortcode that will perfectly match the theme post styling without using a
theme integrated shortcode. Same thing for an RSS feed - what if a user
wants to add an external RSS feed so the feed matches the styling of
regular posts? Theme context is essential to make this work - how is any
outside RSS feed shortcode going to do that?

And as for YouTube, my theme is completely responsive, as well as including
extensive mobile device specific support (things beyond being responsive,
such as selective excerpt/full display of posts, or using different menus
depending on the device). There simply are no existing ways to properly
display YouTube videos without the intimate knowledge my theme has about
the device it is being displayed on. And it is really critical that the
videos be displayed properly on a specific device. Not allowing a theme
integrated shortcode for that would completely break proper display of
those videos.

The topic of integrated shortcodes definitely has one issue - theme
lock-in. But that is really a two-edged sword. It can, in fact, be a good
thing, especially when the shortcodes ensure theme compatibility. My theme
has a very large contingent of users who like the integrated shortcodes
because they know they won't break the theme, and will in fact match the
styling of the rest of the theme. Other users recognize the lock-in, and
simply don't use those shortcodes - user choice. The previous suggestion
for using theme slugs with the shortcodes really makes this clear.

But between the possibility of breaking many existing themes with
integrated shortcodes, and what I believe is essential theme-compatibility
needed for some content generation, I would really hope that any possible
future restrictions on theme integrated shortcodes be minimal or only
require some technical compliance (but not to the point of requiring them
to actually be in the /plugins directory since distributing a theme with
matching plugin install would be a bit of a problem).

Bruce Wampler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120217/54c5f0af/attachment-0001.htm>


More information about the theme-reviewers mailing list