By default, WordPress does not execute shortcodes in text widgets. To enable this function, simply add one line of code to the theme’s functions.php
.
If you do not use the child theme, remember that changes made to the functions.php
file will be overwritten when the theme is updated.
While copying code to functions.php
file it is not nessesary to copy <?php
opening tag.