Title: Shortcode in widgets not working
Last modified: August 20, 2016

---

# Shortcode in widgets not working

 *  [smoore217](https://wordpress.org/support/users/smoore217/)
 * (@smoore217)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/)
 * Hi,
 * I cannot get shortcodes to work in text widgets to save my life. I heard that
   this is enabled by default in the latest wordpress, however it will not work.
   I also tried adding add_filter(‘widget_text’, ‘do_shortcode’); to my functions.
   php file for the theme, but the shortcode still shows up as a string. Was this
   feature broke in the newest version of wordpress?

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/page/2/?output_format=md)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034419)
 * > I heard that this is enabled by default in the latest wordpress
 * Then I’m afraid your sources were incorrect.
 *  Thread Starter [smoore217](https://wordpress.org/support/users/smoore217/)
 * (@smoore217)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034423)
 * It was probably from 6 months ago when this: [http://core.trac.wordpress.org/ticket/10457](http://core.trac.wordpress.org/ticket/10457)
   had the release set for version 3.3. Anyway, my problem still stands.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034440)
 * If you check the Trac ticket, it’s been changed to “Future Release”. At present,
   the only shortcodes that will work in widgets are those specially created by 
   plugins.
 *  Thread Starter [smoore217](https://wordpress.org/support/users/smoore217/)
 * (@smoore217)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034457)
 * Can you move this to the plugins&hacks forums then as this is a known hack and
   deals with troubleshooting it.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034459)
 * It’s not a known hack and it does belong in this forum.
 *  Thread Starter [smoore217](https://wordpress.org/support/users/smoore217/)
 * (@smoore217)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034475)
 * If it isn’t a known hack, then why are there tons of articles littering the internet
   with the add_filter(‘widget_text’, ‘do_shortcode’); solution I attempted?
    [http://digwp.com/2010/03/shortcodes-in-widgets/](http://digwp.com/2010/03/shortcodes-in-widgets/)
   [http://www.wprecipes.com/how-to-add-shortcodes-in-sidebar-widgets](http://www.wprecipes.com/how-to-add-shortcodes-in-sidebar-widgets)
   [http://dannyvankooten.com/630/enabling-shortcodes-in-widgets-quick-wordpress-tip/](http://dannyvankooten.com/630/enabling-shortcodes-in-widgets-quick-wordpress-tip/)
   [http://englishmike.net/wordpress/2008/07/07/wordpress-quick-tips-3adding-a-shortcode-to-a-sidebar-widget/](http://englishmike.net/wordpress/2008/07/07/wordpress-quick-tips-3adding-a-shortcode-to-a-sidebar-widget/)
 * These all cover the same solution, which is not working. It causes behavior not
   intended in original design, so I’d consider that a hack.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034478)
 * It is **not** a core hack.
 *  Thread Starter [smoore217](https://wordpress.org/support/users/smoore217/)
 * (@smoore217)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034480)
 * I don’t think the “plugins and hacks” forum consists of very many core hacks…
   I’d figure this forum is meant for troubleshooting installation and base functionality
   problems.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034484)
 * > Hacks
   >  – For Plugin Coding and Core hacking discussion
 *  Thread Starter [smoore217](https://wordpress.org/support/users/smoore217/)
 * (@smoore217)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034487)
 * Plugins and Hacks
    – Extensions and modifications
 * This is the forum I wanted it transferred to, not Hacks.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034489)
 * That is for plugins only.
 *  [clawler](https://wordpress.org/support/users/clawler/)
 * (@clawler)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034750)
 * While this semantics argument was entertaining was a solution to this issue ever
   found? I’m having the same problem.
 * Smoore217, did you end up posting this issue elsewhere? Any luck?
 * Thanks.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034751)
 * [@clawler](https://wordpress.org/support/users/clawler/)
 * neither you nor the original poster are clear about what shortcodes you were 
   trying to show in the textwidget of what theme.
 * without these details, this is really just a philosophical topic.
 * it might possibly be better if your start your own topic and post the necessary
   details.
 *  [clawler](https://wordpress.org/support/users/clawler/)
 * (@clawler)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034752)
 * Thanks alchymyth, just wanted to see if a solution ever presented itself.
 * Right now I’m using Twenty Eleven in 3.4.2 and it’s with any shortcode I try.
   I’m also using one of the many single line Shortcode in Widget plugins. I’ve 
   also tried putting `add_filter('widget_text', 'do_shortcode');` in the functions
   file myself, but that didn’t work either.
 * Any recommendations?
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/#post-3034753)
 * > it’s with any shortcode I try
 * considering that `[gallery]` and `[caption]` are the only genuine shortcodes,
   and that somethings in `[brackets]` is not always shortcode, what **exact **other
   shortcodes have you tried?

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/page/2/?output_format=md)

The topic ‘Shortcode in widgets not working’ is closed to new replies.

## Tags

 * [fail](https://wordpress.org/support/topic-tag/fail/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)
 * [widgets](https://wordpress.org/support/topic-tag/widgets/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 19 replies
 * 4 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/shortcode-in-widgets-not-working/page/2/#post-3034759)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
