How to Use Shortcodes in a WordPress Text Widget Updated on March 22, 2024 by Brad Markle 0 Minutes, 37 Seconds to Read By default, WordPress shortcodes do not work within Text widgets. If you need this functionality, it is quite easy to accomplish, simply follow the steps below. Using Shortcodes in a WordPress Text Widget Log into your WordPress Dashboard Under “Appearance” click “Editor” In the list of files on the right of the page, click “functions.php” At the bottom of the functions.php file, add the following code: add_filter( ‘widget_text’, ‘shortcode_unautop’); add_filter( ‘widget_text’, ‘do_shortcode’); Click “Update File” and your shortcodes should now work in your Text widgets! Before: After: Changes made to these files may get overwritten after theme updates. It is always recommended to make these kinds of modifications in a child theme. Looking for more guides? We have over 400 WordPress How To Articles to help you! Share this Article Related Articles How to Backup WordPress with the BackWPup Plugin Learn How to Install and Use Mailchimp in WordPress How to Create and Manage 301 Redirects in WordPress How to Add PayPal to WordPress Website Using Video Conferencing with Zoom – WordPress Plugin Create a WordPress News Website with the WP News and Scrolling Widgets plugin Getting Started: Constant Contact Plugin for WordPress Install and Use the Advanced Editor Tools WordPress Plugin The Yoast SEO Plugin: Optimize Your Website to Boost Traffic GiveWP Donation WordPress Plugin