=== Shortcodes in Sidebar ===
Contributors: pankajanupam
Tags: shortcode, shortcodes, widget, sidebar, custom html
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 26.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Runs shortcodes in the Custom HTML widget, the one sidebar widget WordPress still renders without executing them.

== Description ==

Paste a shortcode into a Custom HTML widget and WordPress prints it exactly as you typed it — `[contact-form]`, square brackets and all — instead of running it. This plugin fixes that, and nothing else.

= What changed since version 3.0 =

When this plugin was written in 2011, WordPress ran no shortcodes in any widget, and one line of code fixed it for every sidebar on the site. WordPress has caught up since:

* **Text widget** — core has run shortcodes since WordPress 4.8.
* **Block widgets** — core has run shortcodes since WordPress 5.8.
* **Custom HTML widget** — core still does not, on any version, including 7.0.

So the plugin now does the one thing that is still missing. Where core already handles shortcodes, it deliberately stays out of the way — running them a second time is not a feature.

If you have been using version 3.0 on a recent WordPress, this release is also a bug fix. The old code hooked shortcodes onto the Text widget in a way that made core skip its own, correctly ordered pass, and shortcode output could come out with paragraph tags injected into the middle of it. That no longer happens.

= Features =

* Shortcodes run in the Custom HTML widget, in every sidebar and widget area.
* No settings, no setup. Activate it and it works.
* No database tables, no options, no scripts, no styles, no tracking, no ads, no upsells.
* Nothing to clean up when you delete it, because it stores nothing.

= Privacy =

The plugin collects nothing, stores nothing, and makes no external requests.

== Installation ==

= From your dashboard =

1. Go to **Plugins > Add New**.
2. Search for **Shortcodes in Sidebar**.
3. Click **Install Now**, then **Activate**.

= Manual installation =

1. Download the plugin ZIP file.
2. Go to **Plugins > Add New > Upload Plugin** and choose the file, or unzip it into `/wp-content/plugins/`.
3. Activate the plugin through the **Plugins** screen.

There is nothing to configure. Add your shortcode to a Custom HTML widget and it runs.

== Frequently Asked Questions ==

= Are there any settings? =

No. The plugin is either active or it is not.

= Do I still need this plugin? =

Only if you use the Custom HTML widget. Shortcodes in the Text widget and in block widgets are handled by WordPress itself now, and this plugin does not interfere with either.

= My shortcodes already work in a Text widget. Why? =

Because WordPress has done that for you since version 4.8. Earlier releases of this plugin did it too, which is why you may remember needing it.

= I upgraded from 3.0 and something looks different =

Version 3.0 ran shortcodes in the Text widget *before* WordPress added its paragraph formatting, so shortcode output could end up with stray `<p>` tags inside it. WordPress now runs them afterwards, in the right order, so that markup is cleaner. The content itself is unchanged.

= Does it work with the block widget editor? =

Yes, in the sense that there is nothing to do: WordPress runs shortcodes in block widgets on 5.8 and above, and the Shortcode block exists for exactly that. A Custom HTML widget kept through the Legacy Widget block is covered by this plugin as normal.

= Does it work with page builders and other widget areas? =

Anywhere a Custom HTML widget is rendered by WordPress, yes. Widgets rendered by a builder's own code, outside the core widget classes, are up to that builder.

= Will it run shortcodes in widget titles? =

No. Widget titles are not filtered by this plugin.

= Why does the main file have a different name from the plugin? =

`shortcodes-in-sidebar-widgets.php` is the name it has had since 2011. WordPress identifies an installed plugin by its file path, so renaming it would deactivate the plugin on every site that updates.

== Changelog ==

= 26.0 =
Full rewrite for modern WordPress. The plugin now uses year-based version numbers.

* Fixed: shortcodes now run in the Custom HTML widget, which WordPress has never covered.
* Fixed: removed the `widget_text` shortcode filter, which on WordPress 4.8 and above stopped core from running its own correctly ordered shortcode pass, and could inject paragraph tags into shortcode output in the Text widget.
* Changed: Text widget and block widget shortcodes are left to WordPress, which has handled them since 4.8 and 5.8 respectively — no more double processing.
* Added: GPL-2.0 license file and full license headers.
* Added: a test suite, plus continuous integration on PHP 7.4 through 8.4.
* Changed: readme, plugin header and documentation rewritten; the header version and the stable tag now agree, which they had not since 2015.
* Tested against WordPress 7.0.

= 3.0 =
* Compatibility tag updated.

= 2.0 =
* Compatibility tag updated.

= 1.0 =
* First release, 5 December 2011.

== Upgrade Notice ==

= 26.0 =
Shortcodes now run in the Custom HTML widget, which WordPress itself has never supported. Text and block widgets are left to WordPress, which has handled them since 4.8 and 5.8 — this also fixes stray paragraph tags that version 3.0 could introduce into shortcode output. No settings, nothing to reconfigure.
