Enable shortcodes in WordPress widgets

Here is a quick one for you. If you want to enable shortcodes in your WordPress widgets, this is for you.

add_filter( 'widget_text', 'do_shortcode' );

Particularly useful in the text widget. For example, if you wanted to add a glossary term link.

Published by

TCBarrett

Open Source Architect (Web Geek)