Some days ago I shared a tip on using PHP snippets within WordPress text Widgets. Here’s another equally handy snippet for using Shortcodes within WordPress text widget.
To allow shortcodes within WordPress text widgets, simply edit the
functions.php file from your theme and add the following code
Shortcodes Within WordPress snippets
Once you saved the file, you can now add as many short codes as you want in sidebar widgets.
How to edit functions.php file?
If you do not know how to edit fuctions.php file Please follow below steps to edit WordPress
- Log into your WordPress Dashboard
- Under “Appearance” click “Editor” (if you cant see this it might be disabled – if so contact the company who created your theme)
- In the list of files on the right of the page, click “functions.php”
- At the bottom of the functions.php file, add the above code