Code to Widget Plugin uses PHP files from a specified directory, and (if the file has the proper template tags) adds a Widget.
As of April 2026, Code to Widget is a WordPress php plugin with 10 active installations and a 0/5 rating0. It has been downloaded 3.3K+ times in total. Requires WordPress 3.0+ and PHP false+. Available on WordPress.org since 2010. Last updated 14 years ago — may have compatibility concerns. Top alternative: WPCode – Insert Headers and Footers +….
Code to Widget Plugin uses PHP files from a specified directory, and (if the file has the proper template tags) adds a Widget.
Code to Widget provides an easy way to create widgets, without having to deal with writing the widget class everytime
The plugin provides an interface for selecting a specific folder to search for widgets in. The folder path entered into the settings page must be an absolute path. Then the widgets are easily configurable similar to all other widgets.
The files in the specified folder need to have specific template tags to be added as widgets. The following code will need to be added to the top of the files:
<?php
/*
Widget Name: Test Widget 1
Widget Description: Test 1 widget
*/
?>
A “Widget Title:” field can also be add…
| WordPress | 3.0+ requiredTested up to 3.4.2 |
| PHP | false+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.