# Run Shortcodes in Widget Titles

> Processes shortcodes typed into classic widget titles, for example to show the current year or a dynamic label.

- Type: PHP
- Runs: Run everywhere
- Category: [Widgets](https://wpide.com/library/category/widgets/)
- Tags: widgets, shortcodes, titles
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/shortcodes-in-widget-titles/

## Code

```php
add_filter( 'widget_title', 'do_shortcode' );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Run Shortcodes in Widget Titles" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
