The text widget that comes with the wordpress does not allow you to include PHP code. This plugin adds a new widget called
Samsarin PHP Widget, which will allow you to include PHP code, as well as plain text and HTML.
- Add up to 25
Samsarin PHP Widgetsto your sidebar.
- Add PHP code to both the widget title and the widget body.
- Reset allows you to easily revert the contents of a widget.
Warning: This widget provides great flexibility in customizing your sidebar. It achieves this by automatically evaluating any included PHP included in the title or the body of the widget. Care should be taken when including PHP code in the sidebar, as with anywhere else in the WordPress system.
- Login to your admin console.
- Go to Design | Widgets.
- Scroll towards the bottom of the page and look for the
Samsarin PHP Widgetssection. Here you can select the number of widgets you’d like for your website (default is 1).
- Click the
Addlink on the Samsarin PHP widget to add it to your sidebar.
Editto set the text for the title and the body.
You may enter PHP code both in the title and the body.
- Download the Samsarin PHP Widget and unzip it.
- Login to your admin console, go to
Plugins, and enable the
Samsarin PHP Widget.
- What versions of WordPress are supported?
This plugin has been tested with WordPress 2.1, 2.2, 2.3, and 2.5.1.
- What do I do if Samsarin PHP Widget does not show up in the widget admin console?
First, make sure that the plugin is enabled.
- Log in to the admin console
- Go to Plugins
- Verify that “Samsarin PHP Widget” is in the list. If it is not, then wordpress doesn’t see the plugin. Is it in your plugin directory (wp-content/plugins)?
- Verify that the plugin is enabled
If it is enabled and you can see it on the left hand side of the Design | Widgets page, then it is possible that the content of one of the widgets is causing a problem. With Samsarin PHP Widget version 1.3.2 you can reset the widgets.
- Backup your database.
- Go to Settings | Samsarin PHP
- If you know the name of the widget that is not working, use the “Reset” option. If you do not know which widget is failing, use the “Reset All” option. This will reset the widget to its initial, empty state.
Contributors & Developers
“Samsarin PHP Widget” is open source software. The following people have contributed to this plugin.Contributors