WordPress.org

Ready to get started?Download WordPress

Plugin Directory

PHP Code Widget

Like the Text widget, but also allows working PHP code to be inserted.

There's some kind of error on line 26!

That error means that your PHP code is incorrect or otherwise broken.

But my code is fine!

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.

So, if it says that you have an error on line 26, I assure you, the problem is yours. Please don't email me about that error.

I have code that works normally in a template but doesn't work when in the widget?

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.

Requires: 2.8 or higher
Compatible up to: 3.8.3
Last Updated: 2013-12-12
Downloads: 381,667

Ratings

4 stars
4.5 out of 5 stars

Support

2 of 4 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,3,3 67,3,2 100,2,2
64,11,7
100,4,4
100,10,10
82,17,14
100,1,1 100,8,8
79,33,26
100,1,1
100,1,1
85,13,11
100,2,2
100,4,4
100,4,4
100,1,1
75,4,3
100,18,18
75,4,3
89,19,17
100,8,8
100,3,3
89,9,8
89,9,8
100,7,7
91,11,10
100,1,1
100,1,1
100,2,2 100,1,1
100,3,3
100,1,1
100,1,1 67,3,2