How to Use Shortcodes in a WordPress Text Widget Brad MarkleUpdated on March 22, 2024 1 Minute 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! Summarize and Research with AIShare on Social Media Related Articles Clean Up WordPress Comment Spam with phpMyAdmin How to Use WP 2FA for WordPress WordPress Ends Support for PHP 5.2-5.5 How to Manage Comments in WordPress Editing Your WordPress wp-config.php File How to Add Portfolios Using Jetpack 3 Mobile Apps for WordPress Content Creators using Apple iOS How to Reset the WordPress .htaccess File How To Install WordPress on Debian 10 Cloud Server Are WordPress Loopback Requests Enabled?