I'm well aware that WordPress by default does not process shortcodes in the sidebar. My question is why.

I'm building a very small plugin that exports some content when the shortcode is present. This will be primarily used in the content area. I want to allow the user to display that content in the sidebar and I'm debating including the one line fix to enable the shortcodes rather than adding ~50 lines of code to create a widget.

Is there something going on under the hood that is a good reason to avoid the shortcode in the sidebar? Is it simply a convention?

1 Answer 1


There are a few pitfalls, mainly with wpautop being applied after the shortcode filter, and multiple do_shortcode calls because of plugins that already added this filter to widget_text.

See the discussion in the following ticket: http://core.trac.wordpress.org/ticket/10457


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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