Select Page

WordPress doesn’t allow using Shortcodes in the titles of your widgets by default. But there’s an easy way to enable the processing of shortcodes inside widget titles.

Place this code snippet in your theme’s functions.php file to enable shortcodes in Widget titles in WordPress:

add_filter('widget_title',  'do_shortcode');

The above code will add a filter for the widget_title function. It will call the do_shortcode function, which is responsible for processing shortcodes in WordPress, on every widget title.