Easily add code snippets in WordPress. Insert header & footer scripts, add PHP code snippets with conditional logic, insert ads pixel code, and more.
- Installs
- 3+ million
- Rating
- 4.9 (1.9K)
- Updated
- 2 days ago
Like the Text widget, but also allows working PHP code to be inserted.
| Last updated | March 30, 2022Not updated for over a year |
|---|---|
| Tested up to | WordPress 5.9.20Older than WordPress 7.1.4, the current release |
| Needs WordPress | 2.8 or newer |
| Needs PHP | Not stated |
| First published | March 20, 2008 |
| Support, last two months | No threads opened |
4.7 / 5 from 61 reviews
| 5 stars | 52 |
|---|---|
| 4 stars | 5 |
| 3 stars | 1 |
| 2 stars | 0 |
| 1 star | 3 |
The normal Text widget allows you to insert arbitrary Text and/or HTML code. This allows that too, but also parses any PHP code in the text widget and executes it.
This can make it easier to migrate to a widget-based theme. However, this plugin should not be used long term, as anybody with access to edit the widgets on your site will be able to execute arbitrary PHP code.
All PHP code must be enclosed in the standard php opening and closing tags ( <?php and ?> ) for it to be recognized and executed.
Only users with the unfiltered_html role will be allowed to insert unfiltered HTML. This includes PHP code, so users without admin or editor permissions will not be able to use this to execute code, even if they have widget editing permissions.
The opening of the plugin's own description. The full text, installation notes and changelog are on its WordPress.org page.
That error means that your PHP code is incorrect or otherwise broken.
No, it’s not. Really.
This widget has no real errors in it, it’s about the simplest widget one can possibly make. Any errors coming out of the “execphp.php” file are errors in code you put into one of the widgets. The reason that it shows the error being in the execphp.php file is because that is where your widget’s code is actually being run.
Code in a template runs in the global context. Code in the widget will run in a function context. Make sure that you declare any global variables as global before attempting to use them.


Easily add code snippets in WordPress. Insert header & footer scripts, add PHP code snippets with conditional logic, insert ads pixel code, and more.
#32 by installs
Manage custom WordPress code in one dashboard. Create PHP and HTML snippets, preview code, track snippet totals and reuse code across sites.
#163 by installs
The official companion plugin for Blocksy theme, packed with starter sites, extra features, and integrations.
#234 by installs
The visual editor widget for WordPress.
Automatically add a table of contents to your posts and pages, with smooth scrolling, anchor links, and simple styling options.
#268 by installs
Make sure your plugins and themes are compatible with newer PHP versions.
Read from the WordPress.org plugin API on , when WordPress 7.1.4 was the current release. WordPress.org rounds active installs into buckets. These are the directory's figures, not my verdict, and I haven't tested this plugin.