Note: The ExecPHP widget does not work in the upcoming WordPress 2.5. Therefore, if you upgrade to 2.5, you will need to install the updated version of this widget. It can be found here, now and forever more: http://wordpress.org/extend/plugins/php-code-widget/
A new plugin for Wordpress came out that’s kinda cool. It’s called Widgets, and the general idea of it is to make the sidebars on your blog a bit more configurable, a bit more easily.
So, I decided to spend an hour or so converting my sidebars to Widgets so I could manage them a bit simpler. Editing PHP code is easy but time consuming, while dragging stuff and dropping it to rearrange the blog, well, that’s quick and easy.
Few things I learned:
- The Widgets Plugin does not like Windows. Since I run this site on a Windows box (edit: I did then, I don’t anymore, and anyway, they have fixed this problem since then), it needed some tweaking to make it work. For those who want to know, the problem is in the sidebar_admin_setup() function in widgets.php. More info on this problem is in the comments of this post.
- Text boxes are extremely useful when converting from your existing customized webpage to a widgets based one, as you can simply cut and paste chunks of HTML into them and voila, you’ve got a sidebar widget. However, there’s not a lot of text widgets available. If you need more text widgets, you will need to edit these functions: widget_text_setup(), widget_text_page(), and widget_text_register(). As it turned out, I didn’t need but 4 text widgets because:
- Despite how useful text boxes were for a quick migration, they were not enough.
So, I ended up writing two plugins of my own.
The first one is a Google AdSense plugin. You can download it here: gadsense.zip. It’s exactly the same as the Text widgets, but with (very) minor tweaks specifically for inserting Google Ads in the sidebars. Also, it shows a name of “Google AdSense” in the widgets panel, which is nice. Like the Text widget, you can have more than 1 of them, but unlike the Text widget, you can only have 4 of them, since Google’s TOS only allows 3 ads and 1 link block on a page.
The next one is also like the Text plugin, however it will also let you put PHP code into the text and have it actually work. Here’s the download: execphp.zip. Like the Text plugin, you can have up to 9 of them (more if you want to tweak the code). Note that any PHP code you put into the widget MUST be surrounded by <?php and ?> tags, just like writing PHP normally. Also note that this is isn’t exactly safe, as it’s just doing an eval() on whatever you put in there, so you have complete and full access, as does anybody else who can get to your admin screen. Still, it’s very useful.
Both of those are plugins. Just drop them in the widgets folder under the plugins folder, and activate them on the plugins screen. Then the widgets will be available for you to use on the widgets screen.
Hope these help somebody. They sure helped me. ![]()
i just downloads the adsense widget and upload to specific folder, activate it…
but
at the widgets layout page, its appears a blank widget, with no title…
i am using latest upgraded wp 2.6.2
any guide?
The adsense widget is way out of date and should not be used any more. Use a standard text widget instead, or one of the wonderful plugins for adsense over at http://wordpress.org/extend.
Awesome widget! Exactly what I needed. Thanks so much.
If I want to use php code widget with a theme that is not widget-aware, what should I do? Thanks
Hi Otto,
I was looking for a plugin that does exactly what yours does. My problem is, i have activated it already, but how and where do i put the adsense code? sorry i’m really new at this, hope you could help so I could put up the adsense on the right side of my site. Thanks for your help Otto.
That is a great plug in. It is working perfect. I am using it to get the latest posts from my phpBB forum. However, I had to re-install the forum and the widget went crazy. I cannot access my php code in the widget as the code corrupted my widget section in the admin panel. Is there a .php file where my code I entered in the widget is stored, so that I can edit it. As I have no more access to the widget/code from WP-Admin. I can deactivate the plug-in an all is working again but I would like to use it. I tried to override the execphp with a fresh file but the plugin still remembers my code. Where can I edit it ?
http://codex.wordpress.org/Plu.....bility/2.5 says this plugin is not compatible with 2.5, do you plan to update it?
[...] there is a simple solution available thanks to the author of ExecPHP, another plugin that gives plugins like Show Top Commentators widget support. Here is the direct [...]
[...] I could use a browse to the post an use a bookmarklet. It’s running inside the Executable PHP Widget, which is using this [...]
[...] do this, you need to have a widget with can execute php code. I use Otto’s ExecPHP plugin, but there are others [...]
[...] Executable PHP widget : nécessaire pour Text Link Ads : pas encore mis en place. [...]
Awesome script, thank you for the resource…perfect size!
[...] ExecPHP Widget 1.0 – Does not work with 2.5 widgets, upgrade to the PHP Code Widget. Same widget and author, new version and name. [...]
[...] to get the contents. If you want to insert php in your sidebar, there’s a plugin called PHP Exec. Click on that link and scroll down to where it says execphp.zip, and download it. I hope that [...]
[...] Le plugin vous permet d’interpréter du PHP dans votre widget de barre latérale. Le code de Text Link Ads est écrit en PHP, j’ai donc été obligé de l’installer. [...]
thanks soooo much for this great plugin
OMG thanks soooo much!!
I’ve been trying to find a plugin like this for days now
Thanks, I had no clue a plugin like execphp existed but have wished one did for quite some time now.
[...] second tweak was to split the existing sidebar into widgets. I used a modified version of the execphp plugin four times to recreate the sidebar. The existing execphp plugin did not work correctly until [...]
[...] and poof the search form was styled correctly. I could have used Otto’s execphp widget but this was [...]
If the function is coming up as undefined like that, then either the other plugin is not activated, or it’s misspelled…
ok, I’m just a goober at this, so here is a link to the code http://www.thecosmeticcounter.com/code.txt
Cheers Otto! Fantastic! I had problems getting WordTube to work as a widget (wanted multiple songs listed, not just one), and couldn’t get the multi-version to go into a sidebox. Your widget did the trick
Now I just have to figure out why anything under the widget is way out of alignment (like off the bottom).
Cheers!
[...] 2. Executable PHP widget [...]
[...] do this, you need to have a widget with can execute php code. I use Otto’s ExecPHP plugin, but there are others [...]
[...] you are using Widgets, you can insert the above code inside a PHP widget. Please refer to ExecPHP Widgets [...]
@myself
Ok, nothing to do with execphp. Why this confusion ? Because the problem occured when i activated execphp … If you have a dispaly problem with IE (or any other browser but Firefox seems less touchy) when adding a widget with a plugin, you should test adding a built-in wordpress widget at the same place … Correlation is not causality, old story … ;o) Thanks for your time.
[...] widgets, you are finished!
AllyAnderson: No, I’m sorry, but there is no problem whatsoever with the PHP Code widget. The exephpwidget DIV is coded correctly, and everything inside that DIV is generated by the PHP code that you type into the widget!
I too had the problem with the code messing up in IE. It was not a php code problem. In the plugin file I had to add a right after the div class execphpwidget. Now everything works beautifully in IE.
I knew it wasn’t the code because all of the various codes I tried from half a different plugins messed up the sidebar. 6 plugin writers couldn’t write php code snippets that poorly in my opinion.
Glad it’s fixed. Hope this works for someone else!
[...] the list of shows we are blogging for the current season in the sidebar. Made possible by ExecPHP plugin, which allows PHP code to be run on the sidebar via a widget. Will change, of course, as [...]
[...] Tag ????????“ Executable PHP Widget ”????????????????
Hello Otto,
Excellent plugin. Thanks a lot for that, since i needed it to get the just-as-excellent wp-ajax-newsletter plugin to work (http://code.google.com/p/wp-ajax-newsletter/). One question though: you refer to some safety problem, although you don’t explain this. What’s the danger of using the plugin? For your information: it works at my site, so there’s no problem to be solved. Just curious.
[...] some additional searching provided answers from Otto of Nothing to See Here here. Basically I needed to enable a PHP executable widget that I could drop the native Wordpress php [...]
Otto: Bruce was having a problem with “permissions” with widgets.php. I had a similar problem stating “Method not implemented – POST to /wp-admin/widgets.php”. I suspect others are having similar problems.
The problem was that the “ModSecurity” module in Apache was detecting what it though was a “PHP Injection Attack” when posting (submitting) the php code in your widget. (Normally you would not want a visitor to your website to post php code that would be executed.)
My (crappy) solution was to turn off (comment out) that part (2 lines) of the modsecurity, submit the php widget, then re-enable the modsecurity. It means you have to have access to your Apache config while making changes to the php widget code, OR you need to permanently disable the modsecurity — NOT a good idea!
But if you don’t update the PHP widget code very often, temporarily disabling the modsecurity while submitting the code works okay.
A possible work-around: Do as described above to submit a php code widget that is simply a PHP include command. Then modify the separate php file using FTP, vi, or whatever appropriate tools you have.
Otherwise, after a little digging through error logs and other messing around, the widget works as advertised. THANKS!
Brooke: The plugin works perfectly well with 2.3.1, there’s nothing wrong with it. You need to understand that by itself, the PHP widget does nothing of importance. Any code that is created on your page is created by the PHP you put into the widget. If it’s broken, then either your code is broken or the theme is broken.
Yes, having the same problem as Chewru Guru with 2.3.1 wordpress…. any ideas??? I’ve used this plugin for many other sites with older versions of wp just fine.
[...] quite easy installation. What if you have widget sidebar just like me? No problemo, install the Executable PHP widget 1.0 and then you can paste to your php widget. Runs [...]
[...] You can run PHP codes inside the Sidebar Widget by the help of this plugin. You must install the plugin in order to use ads like Text Link Ads and other different feature sites. Grab the plugin here. [...]
Thanks, i just used this plugin.
[...] Google Adsense – It’s exactly the same as the Text widgets, but with (very) minor tweaks specifically for inserting Google Ads in the sidebars. It basically allows you to put javascript into the sidebars via widgets. [...]
[...] Fun with Widgets – Google AdSense and ExecPHP widgets. [...]
[...] Download Executable PHP widget [...]
[...] Executable PHP widget: This is a plug-in that lets me add PHP specific widgets to the sidebar. [...]
[...] a tag cloud to your theme. There are two suggested places this would be good at.
[...] Executable PHP widget [...]
Without knowing the specific PHP code you’re putting in the widget, I cannot tell you what the problem is. However, it’s absolutely certain that it’s the code you’re putting into the widget. The ExecPHP widget is like the Text widget: by itself, it does absolutely nothing. It’s just a container for your own code.
I suggest running your site through the W3C validator. If your code is valid, it will likely show up correctly in all browsers. If your code is invalid, then it won’t. That’s sort of the point of validation.
I’m having a problem with IE7/Opera and the Exec-PHP (4.2) plugin on latest wordpress 2.3.1. In firefox, it works gloriously. In IE7 and Opera, however, if anything is BELOW the widget containing the php code, the alignment goes to hell and everything is screwy. Im using the cutline 3.1 theme and the widget in question is Star Ratings for Reviews 0.4.
The workaround is to put the Exec-PHP widget as the last widget on the sidebar, but obviously in this case that’s not where I want it to be. =)
I’ve seen you state that it’s the PHP code, but I imagine I dont get why it would work in firefox then. Of course it’s a superior browser, but.. heh.
Thanks for all your hard work! Let me know if you have any ideas.
I wish I had this plugin sooner for one of my clients! Thanks a lot for doing all this work Otto! Great plugin, works as advertised.
[...] Executable PHP widget – Allows you to execute PHP commands from a plugin within the sidebar. I use this in conjunction with the Show Top Commentators plugin you see over on the right. [...]
[...] ExecPHP: Creats a PHP widget.
[...] Executable PHP Widget [...]
[...] Det orginale plugin finder i her: http://ottodestruct.com/blog/2.....h-widgets/
Thank you very much.
It works fine!
[...] Executable PHP Very useful widget in addition to WP built-in Text Widget. It accepts PHP codes as well as HTML. I use it in conjunction with AdRotator (multi-line) above. Get it here. [...]
[...] a combination of text and php code. Just like it did in it’s original form (the ExecPHP widget by [...]
[...] Fun with Widgets | Nothing to see here [...]
[...] without the .txt extension) anywhere in your template. You can also put it on your sidebar using PHPExec [...]
[...] Fun with Widgets | Nothing to see here ????WordPress widget??php????????execphp.zip (tags: WordPress plugin widget php ??) [...]
[...] ein Wordpress-Plugin für Widgets gesucht hat, das auch PHP-Code ausführen kann, dem sei ExecPHP von Otto empfohlen. Tut auch in Wordpress [...]
[...] Executable PHP Widget – Allows me to put PHP code into a widget. Very, very, very useful for customising your blog. [...]
[...] of running out of text widgets. Afterall, Wordpress only provided nine text widgets. I found this Executable PHP Plugin which will give you nine widget boxes. Just like how text widgets transform your html codes into [...]
[...] followed Rich’s suggestion and added the Executable PHP Widget widget to my blog. I used this widget to create a new tag cloud widget to replace my UTW tag cloud [...]
Michel: Update to the latest WordPress. Either 2.2.3 or 2.3. This will fix your problem.
Hmmm. It seems that when I add a second widget, the results is a repeat of the first one. So I get two instances of the first execphp widget output on the sidebar.
(I’m using WP 2.2.)
[...] the sidebar, I’m using the Google Adsense widget plugin by Otto. I tried text widgets at first, but I use quite a few already and after a while [...]
[...] support widgeting. Here is how to fix the issue: Download and install yet another plugin, Executable PHP widget. Then create a PHP block for the sidebar, and put as the content something [...]
Just used this – works great – Thanks!
[...] Widget is one of the most important widgets, because you can attach HTML snippets on it. Another is PHP Code Widgets to attach an executable PHP code. Copy and paste your affiliate links on Text or PHP widget, and [...]
[...] is called Trackbackers. Getting it in my widgetized sidebar necessitated installing the ExecPHP plugin, which allows you to put executable PHP code in a sidebar widget. I also had to dink with the [...]
[...] pentru ca aveti nevoie de un interpretor de cod PHP in interiorul widgetului. Se numeste
Hi Otto,
it doesn´t works with my WordPressMU 1.2.4. Only text will be saved, no php-code.
WP 2.2.2 –> it works.
Viele Grüße,
Maxoo
[...] you wanted to create a sidebar widget containing a tag cloud, you will first need to install the Executable PHP Widget plugin or something similar; this allows you to run PHP code within a widget. After this plugin is [...]
David,
No, ExecPHP is perfectly compatible with Beta 3, something’s just wrong with the code you put into the widget. Because your code executes in the context of the execphp plugin, any error in your own PHP code causes the error to appear to come from the plugin. But the key here is that the error is in the “eval()’d code”. Your own code is the code that’s being “eval()’d”.
Sorry, I know that that doesn’t help much, but it’ll tell you where to look at least.
Hi Otto,
I’m currently using 2.3 Beta 3 of WP and am getting the following error when I try to insert my FAlbum php script to display 4 random photos:
Fatal error: Call to a member function on a non-object in /home/.valenzuela/dcelis/david.sebastiancelis.com/wp-content/plugins/execphp.php(24) : eval()’d code on line 1
Is this compatability issues with Beta 3, or is something wrong just happening?
[...] may need to get a plugin by Otto that allows the use of php code within a Widget! Go to his post Fun with Widgets and look for the execphp.zip [...]
If that update fixes your problem, then you need to update WordPress. One version of WP had a bug that required that fix, but the latest version works perfectly with the original version.
Update the widgets.php according to post 32 http://ottodestruct.com/blog/2.....omment-756 solve my problem.
Thanks
[...] simple solution comes in the form of a plugin from Otto Destruct, called ExecPHP. After installing ExecPHP (Same installation as any other WordPress plugin), you will have the [...]
[...] WordPress Plugin – ExecPHP http://ottodestruct.com/blog/2.....h-widgets/ [...]
ExecPHP widget – Great plugin, thanks for building it!
Steve
Heri: You are using an older or incorrect version of Widgets. The version of Widgets that was included in the first release of Widgets in the core code had this problem. It was patched for subsequent releases of WordPress.
In other words, update WordPress to the latest version (2.2.2 as of this writing) and the problem will go away.
Hi Otto, I write at montrealtechwatch.com
I used the phpcode to pull most commented posts. however, I noticed that if you add another php code widget, for another php function, it displays the exactly the same thing, i.e. the results from the first php code 1 widget. looked at the database, and it stores both php code in the wp_options row. i don’t know now where to look at.
????
[...] and apparently I don’t have the skills to make it do that. However, if you install the ExecPHP widget, which are like text widgets for executing PHP, you can insert the appropriate PHP to call up your [...]
[...] of my cool sidebar things so I’m back to this theme.
Best wordpress plugins to get you started…
This is the first post of a 3 series post i promised you. This post will help you to get started with publishing your own blog within few seconds. So, it looks that you are interested in setting up your blog. This post is the written description of the…
[...] Executable PHP widget: J’ai mis un moment
[...] Wordpress 2.2 to 2.2.1 went smoothly for me. However, I had to go back to the original version of ExecPHP. I had mod the codes in order for ExecPHP to work with 2.2. Since 2.2.1 addressed that bug, my [...]
[...] de nodige flexibiliteit in de widgetized sidebar, gebruik ik de Executable PHP Widget. In deze widget die gebaseerd is op de standaard tekst widget, kun je PHP code laten uitvoeren. Ik [...]
[...] sur la page de téléchargement, et d’avoir installé au préalable le petite plugin Executable PHP widget (qui permet de rajouter des widgets interprétant le php dans la sidebar). Le reste est [...]
[...] It Up Fortunately, it is fairly simple to get this to work. First you need to get Otto’s ExecPHP plugin. This allows you have a ‘textbox’ widget which can execute php [...]
[...] Benötigt: ExecPHP [...]
[...] Executable PHP Widget [...]
Thanks a lot !! I’m a complete newcomer to wordpress and spent days and night trying to figure how to insert my html code from amazon or del.icio.us like I did on Blogger ! Thanx a lot ! You saved my next 2 or 3 coming nights for sleeping !
)
[...] PHP and Executable PHP Widget: These two are especially handy for working with plugins that may need insertion of PHP code into [...]
Worked like a charm for Technorati Rank, but not Stumble Crumble.
Any ideas?
THANKS!
Works as advertised. Great plugin.
[...] So, I installed a very simple plugin which allows PHP to be executed within the side widgets. I’m using ExecPHP v1.0, not to be confused with the Exec PHP above of the all-too-similar name. This one doesn’t [...]
[...] http://ottodestruct.com/blog/2.....h-widgets/ [...]
[...] more investigation I found a text widget that allows you to insert php code into the sidebar called ExecPHP. I probably could have used that to insert the list in the sidebar, which would save myself any [...]
[...] the plain text widget that comes pre-installed with the Sidebar Widgets plugin, the Executable PHP Widget allows you to write your own custom PHP code and load it into your sidebar with ease. Currently, [...]
[...] ???????Fun with Widgets » Nothing to see here?execphp.zip [...]
[...] 1. Execphp [...]
[...] Executable PHP Widget Use this for activating sidebar widget plugins. [...]
Otto, not attempting to edit the widget file. That’s what’s odd. I just add the PHP widget to my sidebar, put some code in it, and get the following message
You don’t have permission to access /keenstuff/kltestblog/wp-admin/widgets.php on this server.
The code I put in is simple
Recent Posts
">
Strange. The widgets file is showing a permission of 644.
I know I am doing something wrong somewhere but just don’t know what. Any suggestions? By the way, I get an odd “you cannot write to such and such directory” for some other admin items,too. Not a pattern. There must be a permission screwed up somewhere along the way.
Thanks,
Bruce
Bruce: What are you talking about? It’s a plugin. Drop it anywhere in the plugins folder, activate the plugin. You don’t need to edit any widgets.php file or anything like that.
All the files in the Wordpress directory must have at least 444 permissions, most likely, but that’s normal for Wordpress.
Tried it on my test site, which has 2.2.1 installed, and got a message along the lines of “you don’t have permission to edit (or access?) widget.php file on this server …”
Smells like I need to fool with my file permissions but not sure what setting to assign. Currently have set to write by me only.
[...] PHP widgets running under the Execute PHP widget disappeared. According to Otto, the author, this was a known issue in WordPress 2.2, that should be resolved by [...]
[...] Executable PHP Widget [...]
Wordpress 2.2.1 works with the ExecPHP widget as is, no changes required.
And no, you will not lose any settings by updating the widget.
I have the problem with Wordpress 2.2 and understand that I need to update my widgets.php as per link at the top of this page. Will this effect my current widgets settings?
[...] plugin has not been widgetized so if you use widgets on your sidebar, you’ll need Otto’s ExecPHP or something like [...]
[...] plugin had to be undone. This modification was posted on John’s blog and the plugin can be re-downloaded from the original [...]
[...] Wordpress 2.2 to 2.2.1 went smoothly for me. However, I had to go back to the original version of ExecPHP. I had mod the codes in order for ExecPHP to work with 2.2. Since 2.2.1 addressed that bug, my [...]
[...] you’ll see it on my left bar. At least if you are not coming here directly. With the help of Otto’s PHP widget plugin, I put some PHP code on a [...]
[...] ??????????Fun with Widgets??????????????????????????????????????????????????????? WordPress ??? Widgets ???? PHP Code? [...]
Thx a lot for the solution with the execphp. I use it for my latest Pixelpost photograph to be displayed in WP.
Best wishes!!
Jens
that is so amazing plugin to wordpress and me
Thank u so much,? am so funny
[...] widget qui permet d’afficher du php, qui s’est pour finir très bien réglé après une modification d’un fichier dans [...]
[...] Executable PHP widget by OttoLike the Text widget, but it will take PHP code as well. Up to 9 instances of this widget may exist. Heavily derived from the Text widget code included with the widget plugin by Automattic, Inc. [...]
@chutney: Something is wrong with the PHP code you put into the widget. That’s what causes that error.
@rogilvie: I can’t tell you what’s wrong with your code, exactly. The widget itself doesn’t modify anything or produce any real output of its own. If it’s breaking the page, it’s your code that is doing it, somehow.
sry – this is the whole code, removed the php tags at start and end to get it in the post…
wp_list_pages(’exclude=44,45,46,48,50,51,52,53&title_li=’ . __(’Pages’) . ” );
Getting this error:
Parse error: syntax error, unexpected T_STRING in /home/.dino/chutney/makingchutney.com/wp-content/plugins/execphp.php(24) : eval()'d code on line 1Well… duh!
Nevermind, I deleted and reloaded the plugin and it works as advertised.
Steven: The PHP widget is basically identical to the Text widget. It cannot “screw up” anything by itself.
It’s certainly possible for the code you use to do something like that though. So I’d suggest changing your code.
Executable PHP widget seems to screw the sidebar up in IE 7. No problem in Firefox. Using WordPress 2.2. Makes the bottom half of the sidebar move to the opposite side and not lined up. Using default theme.
Here is the code I put in the widget
‘ . __(’Pages’) . ” ); ?>
[...] am using the Executable PHP Code
[...] mit WordPress 2.2 arbeitet, und die Widgets auch für PHP-Code nutzen möchte, wird das Executable PHP widget-Plugin mögen. Doch gibt es einen Bug, der es nicht ermöglicht mehr als 1 Widget zu laden, jedes weitere [...]
[...] Another problem, if your plugins aren’t widgetized then what do you do? I had to use this plugin(execphp). [...]
[...] Widget plugin that was very useful is the Executable PHP widget found here . It works like a Text widget, but it will allow you to use PHP code as [...]
[...] Visit [...]
thanks..
i really dont understand about php
so with this widget its easy
just copy paste..lol
[...] 2.2 might be a good idea. The only trouble that I noticed with the new version is if you use ‘Otto’s execphp plugin‘ or other similar plugins to enable php in your blog’s sidebars you’ll need to [...]
[...] bis dato noch kein Workaround für King-Text. Nach langem suchen habe ich dann endlich das ExecPHP-Widget gefunden. Jenes funktioniert bei mir problemlos mit PHP-Code in der Sidebar, meine doofe Tagwolke [...]
There’s a fix for Wordpress 2.2 that will correct this problem:
Download this file: widgets.php.
Replace your /wp-includes/widgets.php with this file. Problem solved for the moment.
I’ll have a fix to the widget itself that should allow it to work with anything sometime tonight.
[...] recognized the magnitude of the problem. It wasn’t just the tag cloud. It was the Executable PHP Widget. Sure enough, all of the PHP widgets were showing the Top 10 Daily [...]
Thanks.
[...] the hard coded search form and above the widget test when I discovered my new favorite widget, the Executable PHP widget, while reading Aaron Brazell’s 10 Things You Should Know About Wordpress 2.2. It was also in [...]
Look at http://trac.wordpress.org/ticket/4275
Hmm…Samsarin’s PHP widget seems to have the same bizarre problem.
I’m having trouble using this plugin with WP 2.2. Whenever I have more than one of these widgets in use at one time, the contents of the first to be evaluated are copied to every other instance of the widget.
[...] widget will not execute PHP code, so you have to do it the old fashioned way. Unless you use the execphp plugin, which enables you to
[...] Algunas de las funcionalidades que le he agregado al blog requieren insertar código PHP en la barra lateral y para no estar tocando los archivos la configuro vía widgets, con Executable PHP widget puedes ejecutar varios bloques de código y organizarlos fácilmente en tu barra lateral. Puedes ampliar la información sobre este plugin aquí. [...]
OK. That didn’t work either. Here’s the link if anyone needs it:
http://wordpress.org/support/t.....ost-557660
Oops here the advice from Otto
You need to edit that widget and add and around the function call that you’re making. Why? Because the html it’s creating has each link inside of an li tag, but you don’t have a list around those for the li tags to make sense.
Just edit the widget and change this:
// //
to this:
//
//
forgot to put in the backslashes. The backslashes are like quotation marks around the code. They are not part of the answer.
Otto, Thank you so much for coming over to wordpress/support to help me with my question. Your answer worked perfectly. I’ll put it here too in case anyone is having trouble with Top Commentators or Popularity Contest formatting.
Here was Otto’s response:
You need to edit that widget and add and around the function call that you’re making. Why? Because the html it’s creating has each link inside of an li tag, but you don’t have a list around those for the li tags to make sense.
Just edit the widget and change this:
to this:
Thanks again!
Hi Otto,
I think I’m having an problem with execphp, but I’m not sure if it’s that or the plugins I’m using. The two
I’m having issues with are “Popularity Contest” and “Top Commentators” – both use php code to call them.
would you mind taking a look at this thread over at wordpress support to see if you have any insight for me?
http://wordpress.org/support/t.....;id=116715
thanks so much!
[...] Execphp A wonderful little plugin that lets you put php code on your widgets in the sidebar. Heaven-sent! [...]
Martin: You put the php file into the wp-content/plugins folder. Then you go to the plugins screen and activate the plugin. Finally, you go to the widgets screen, and you’ll have a new widget available for dragging and dropping into the sidebar. When you configure it, it’ll have a textbox for pasting the adsense code into.
I’m new to WordPress, how do I exactly put my AdSense code into my sidebar using gadsense.php?. I know basic PHP and HTML, but I do not know WordPress Plug in API. I’ve also activated widgets plug in successfully.
[...] Executable PHP widget [...]
[...] plugins that require PHP coding, you’ll want to add Executable PHP widget by Otto. Both of these should be added to your plugins>widgets directory on your [...]
[...] php tags in your widgetized sidebar. If you want to install plugin code in a widget, you need an Exec-PHP widget to enable PHP scripts to run in the widget. (If you are manually editing your sidebar.php file, you [...]
Every time I try to put the php code on it using your widget it says: The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
No matter when I try it. It says that EVERY time.
if you could please email me if you know what’s wrong, i would really appreciate it. (the-musicinmyheadAThotmail.com)
thanks
[...] Executable PHP Widget [Download] – Aggiunge fino a 9 widgets ai Sidebar Widgets nei quali è possibile inserire codice PHP eseguibile. [...]
I cant express enough thanks for this wonderful widget, it has made my life very easy, thank you so much.
I’m new to WordPress, how do I exactly put my AdSense code into my sidebar using gadsense.php?. I know basic PHP and HTML, but I do not know WordPress Plug in API. I’ve also activated widgets plug in successfully.
James: Fixed.
The download links no longer work
[...] Executable PHP widget [...]
Thank you.
[...] ???????Fun with Widgets » Nothing to see here?execphp.zip [...]
Just what I was looking for. I just updated my theme to a widget based, and had to move all my custom menu. Thanks, and keep up the good work.
[...] plugin’ qui permet d’insérer facilement la liste dans la sidebar : execphp ! Ce petit plugin’ permet d’insérer du code php exécutable dans la sidebar,
[...] the plain text widget that comes pre-installed with the Sidebar Widgets plugin, the Executable PHP Widget allows you to write your own custom PHP code and load it into your sidebar with ease. Currently, [...]
[...] a dica encontrada tenho que instalar o plugin executável PHP para textos widgets para o encaixe funcionar, feito subi o plugin para wp-content/plugins/widgets, (claro terá [...]
[...] While I was playing with the code and confirming that I am not a programmer, I realized that I wanted some of the widgets to go away when people look at a post. I came across Otto’s page and installed the Executable PHP Widget. [...]
[...] Our base installation for Openads is complete.
[...] will also execute php code. If you have plans to monetize your blog, then be sure to grab the Executable PHP Widget because I am sure you will need [...]
[...] need to get the PHP Widget Plugin and activate it.
[...] find a solution; I tried a few different widgets but none of which seemed to work.
[...] Executable PHP Widget enables you to run PHP codes with the SideBar Widgets plugin. [...]
This is great. Thank you very much.
[...] PHP widget
[...] After more googling, I found out that the STA plugin does run on widgets, if you installed the executable PHP for Text widgets [...]
[…] I had to install this Plugin because the Feature Sites for Text Link Ads (aff) and the Top Commentators requires a PHP call and by itself, the Sidebar Widget doesn’t execute PHP codes. Working fine. Thank’s […]
[...] Every time I play a song it’s recorded by a little bug on my computer trained to ship the titles to my last.fm profile page. The data is harvested there by a Wordpress widget created by a guy named Jonathan and then published here using another widget by a guy named Otto. [...]
[...] updgrading to a newer version of this theme, I added the execPHP plugin to able to execute php commands from my sidebar widgets. Without it, I would have a tough [...]
This widget works great.. thank you so much!
Thanks for the Adsense widget! It’s exactly what I’ve been looking for. Now it’s up and running. Thanks again.
Hi,
When I insert some PHP code into the widget and hit update/save, all the code dissapears! So it’s not working. Any ideas on what may be causing this? I am using WP 2.1 and on WP Mu.
[...] This Plugin allows you to run PHP codes inside the Sidebar Widget. I had to install this Plugin because the Feature Sites for Text Link Ads (aff) and the Top Commentators requires a PHP call and by itself, the Sidebar Widget doesn’t execute PHP codes. Grab the Plugin here. [...]
I realized that the code I’d put in my last comment didn’t come through in tact. In any case, I suspect it’s beside the point. The real question may be this: Would it be possible to alter the execphp widget so that it included conditionality? E.g., in addition to the title and code boxes that currently exist, there could be another box at top which allowed the option of attaching conditional code. If left blank, the widget would function as it does now. If filled it, the conditions would be assessed, and only if true woud the box then be added, again just as it works now, but if the conditions proved false, then no box would be added to the sidebar at all. This would probably solve everything I need, and it would open up a world of possibility for this widget’s usage!
execphp is a great little plugin! You can see the Categories block I created with it on my left sidebar at potluck.com — it shows only the top level items, no subcategories, just what I’d wanted.
I wonder, though — on the “Potluck Creative Arts” page and all its subpages, I’d love for an image to show up *instead* of the Category block. I tried this:
“;
} else {
echo “Categories” . wp_list_cats(’sort_column=ID&children=0&list=1&hide_empty=0′) . “”;
} ?>
…and I got close. The image shows up correctly on the appropriate pages instead of the category block. However, on all other pages/posts, the category block goes crazy — instead of showing up the way it does right now on the site, the “Categories” heading appears at the very bottom, below all the category items, and each category item is formatted as if it were its own little sidebar block, with the graphic outline. Looks terrible! Any idea what I could do, or is that just too much a general php/CSS question for me to ask here w/r/t to the execphp plugin?
[...] Next, I’ve installed the Show Top Commenters plugin as promised. It is quite customizable and easily done. By putting the php code into a new blank widget via Executable PHP widget by Otto instead of in my sidebar through an edit client and then have to upload via FTP, I can customize the plugin right in my WordPress Presentation tab and save from there. Easy-peasy. [...]
Thanks a lot. nice pair. Downloaded, installed, using
When I paste my adsense script in the adsense widget and click save changes, on re-opening the text disappears!
Should I do something to encode/escape the HTML tags?
Never mind the above; for whatever reason, the problem vanished after re-downloading, replacing the file, trashing the cache, and reloading the page.
-rob.
I’m having trouble with what should be quite simple — the plug-in is downloaded and it resides in the proper directory, but it won’t show in the list of available plug-ins. Help?
-rob.
[...] I’m using Otto’s Google Adsense widget, it’s working very well. [...]
Nice plugin. Worked just perfectly; and much more flexible than some of the others.
[...] When I got home, I noticed that Text Link Ads has sold three more links for me! These guys are on a roll. I wonder how long it will take them to sell all eight spots? Thanks to a Victor at City Guide for pointing me to the ExecPHP plugins. This plugin allows you to run PHP codes inside the Wordpress Sidebar Widget. I used the new plugin to run the Text Link Ads code inside my sidebar. The links were under the 468 Google ad before. It looks much better now, [...]
[...] When I got home, I noticed that Text Link Ads has sold three more links for me! These guys are on a roll. I wonder how long it will take them to sell all eight spots? Thanks to a Victor at City Guide for pointing me to the ExecPHP plugins. This plugin allows you to run PHP codes inside the Wordpress Sidebar Widget. I used the new plugin to run the Text Link Ads code inside my sidebar. The links were under the 468 Google ad before. It looks much better now, [...]
Awesome!! That execphp was just what I was looking for! You rock!
The link has been fixed. Sorry, I’ve had hosting issues lately.
hi, i just wanted to download exephp.zip. the link seems to be broken??
can you send me the zipfile to me email adress? would be sooo great!!!!!!!
thanks kris