WordPress give you the ability to add codes in your post using shortcodes. But what if you want to use shortcodes in your sidebar. Well this isn’t that tough to do. All you need to add the below code to your theme’s functions.php file and you will be able to add shortcodes to your sidebar using text widgets. Don’t panic if you think that editing theme files is not your cup of tea. Just check out the steps below.
1. Login to your WordPress site dashboard and goto Appearance > Editor
2. Click Theme Functions (functions.php) link on the right sidebar. This will open up the functions.php file for editing.
3. Add the below line just after the like <?php on the top.
4. Click the Update file button to save the changes made.
Thats all you need to do. Now you can add shortcode even in your sidebar using text widgets.
Do you like this article?