DiggingIntoWordPress

by Chris Coyier & Jeff Starr

Daily archives: Wednesday, March 10, 2010

Shortcodes in Widgets

Posted by on

I had occasion the other day to run a shortcode inside of a text widget. You know shortcodes… we talk about them all the time. They are keywords in [square brackets] that do something special. Sometimes something really simple like returning a string (so you can have a global location to change that string) or something complicated like call a plugin that does something fancy like build a photo gallery.

Code is poetry