• Skip to main content
  • Skip to primary sidebar

Supplemental Resources

Just The Tech, News, and Info We Deem To Post

  • Home
  • Home
  • Home
  • Home
  • Home
  • Home
  • Home
  • Home
  • Home
  • About
  • About
  • About
  • About
  • About
  • About
  • About
  • About
  • About
  • Contact
  • Contact
  • Contact
  • Contact
  • Contact
  • Contact
  • Contact
  • Contact
  • Contact
  • Contribute
  • Contribute
  • Contribute
  • Contribute
  • Contribute
  • Contribute
  • Contribute
  • Contribute
  • Contribute
  • WordPress
  • Marketing
  • Business
  • Computing
  • Security
  • Publicity
  • Resources
  • WHATEVS

Allow Shortcodes in Widgets and Excerpts

Screenshot of WordPress plugin php and html code

Add the following code to your WordPress theme’s function.php file, or a functionality plugin to allow Shortcodes in Widgets and Excerpts

/** Allow shortcodes in the excerpt */
add_filter('the_excerpt', 'do_shortcode');

/** Allow shortcode in text widgets */
add_filter('widget_text', 'do_shortcode');

by Jack Alltrade on March 5, 2017

Filed Under: Code Snippets, WordPress Core Tagged With: Code, Post Excerpt, Widgets, WP Core

Reader Interactions

Share Your Two Cents Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

© Copyright Jack Alltrade & Associates 2026 · Purely Supplemental™ is a trademark of Jack Alltrade & Associates