Short codes are meant for pages and posts. Widgets are a different thing.
You can use short codes in widgets, but you have to tell Wordpress to parse them properly.
To get the short code to run in a TEXT widget, try adding the following code to the same file you set up your short code in:
add_filter('widget_text', 'do_shortcode');
More info: wpsites.net/wordpress-tips/enable-...
developer.wordpress.org/reference/...
codex.wordpress.org/Plugin_API
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Short codes are meant for pages and posts. Widgets are a different thing.
You can use short codes in widgets, but you have to tell Wordpress to parse them properly.
To get the short code to run in a TEXT widget, try adding the following code to the same file you set up your short code in:
add_filter('widget_text', 'do_shortcode');
More info: wpsites.net/wordpress-tips/enable-...
developer.wordpress.org/reference/...
codex.wordpress.org/Plugin_API