Viewing 2 replies - 1 through 2 (of 2 total)
  • Anonymous User 11607829

    (@anonymized-11607829)

    Unfortunately, text widgets do not support using shortcodes out of the box. There are ways for the more adventurous to add this kind of functionality by editing functions.php with the following lines:

    add_filter( 'widget_text', 'shortcode_unautop');
    add_filter( 'widget_text', 'do_shortcode', 11);

    I do not know the design decision behind not allowing shortcodes in the first place, so make changes like this at your own risk.

    Thread Starter jsurveyer

    (@jsurveyer)

    Thanks the fixed work. But it does appear to be strange why shortcodes would not be allowed – when putting in JavaScript in sidebar widgets users are responsible for making sure the JS code does not bomb or go outside the widget area.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shortcode not working in sidebar’ is closed to new replies.