We showed you how to add a shortcode in WordPress, then we also showed you how you can use shortcodes in your WordPress Themes. In this article, we will show you how to use shortcodes in your WordPress sidebar.
First thing you need to do is open your theme’s functions.php file and paste this code:
Now all you have to do is go to your Appearance » Widgets Screen and create a text widget. Then you can paste any shortcode that you have enabled on your site, and it will function properly.