Widgetize Anything

November 30, 2006 By: Erik R. Category: Wordpress 34,152 views

Rate this post:
1 Star2 Stars3 Stars4 Stars5 Stars (42 votes, average: 4.67 out of 5)
Loading ... Loading ...
As of Wordpress 2.8.2, this plugin no longer works. I recommend switching to use the PHP Code Widget. It’s exactly the same as this one, except that it requires you to use <?php and ?> tags.

There are many Wordpress plugins that should be converted into sidebar widgets, made compatible with the Automattic Widget Plugin, but, for whatever reason, have not yet been converted. Wouldn’t it be nice if there were a generic way to call other plugins from within a sidebar widget? Now there is! Introducing…. Widgetize Anything!

Basically, it works just like the built-in text widgets, except that it allows you to put in PHP code into the body of the widget.

widgetize-anything.tar.gz

widgetize-anything.zip

Features

  • Create any number of Widgetize Anything widgets
  • Paste PHP code directly into the widgets in the widget admin
  • Built in optional “Title” property.

Requirements

Installation

  1. Download the plugin here: widgetize-anything.tar.gz (2.3 kB)
  2. Unzip the plugin into your /wp-content/plugins directory.
  3. Activate the plugin in your WordPress admin.
  4. Choose how many Widgetize Anything widgets you want under Options –> Widgetize Anything (see screenshots)
  5. Enter the desired PHP code into the widget on the Sidebar Widgets page in your WordPress admin (see screenshots).
  6. Drag the widget onto the sidebar where you want it on the Sidebar Widgets page in your WordPress admin.

Screenshots

Widgetize Anything Options

The options screen

Hello World

The simplest example: Hello World

Highest Rated

Calling the WP-PostRatings plugin to display the highest-rated posts.

Troubleshooting

It’s important to understand that the code that you put into your widget must be valid PHP code. You may not open or close PHP blocks with “< ?php” or “?>”, nor can you place straight HTML code into the widget content. You have to echo out all the HTML code that you want to show up on your page.

Change History

1.2 2007-06-25 Fixed a bug caused by Wordpress 2.2.1. They changed the way widgets are registered once again.
1.1 2007-05-17 Fixed a bug caused by Wordpress 2.2. For 2.2, they incorporated the sidebar widgets plugin into the main codebase, and a few things changed.
1.0 2006-10-24 Original version

Questions and Comments

You may leave questions and comments on this blog, or email them directly to me at erikwordpressplugins -at- gmail.

71 Comments to “Widgetize Anything”


  1. Thanks for all that info, Kaz. If it’s a problem with the regular Text Widget, then I don’t think there’s much that I can do. It must be a general javascript issue with Wordpress. Yes, I use Firefox. I never use IE and I can’t really understand why anyone would.

  2. Nice! Here is another plugin, that provides similar functionalities. I added some helpful features. So, if you like visit http://www.janek-niefeldt.de/blog/mycustomwidget.

  3. It is a very nice plugin. How can I delete the widget created?

  4. Cecilia: Drag it back off the sidebar, just like all other widgets.

  5. I thought I’d offer up a tidbit of information to a previous poster. Yes, you *can* change the box names from “Widgetize Anything 1″ to something else. I’ve done it for a few clients, actually (hacked from this site:http://br.bingorabbit.com/wordpress-hack) – it works very well.

  6. Rodrigo says:
    6

    Hi,

    I tried use your plugin and it doen´t works fine. It doesn´t allow change my sidebar more. The problem is:

    %BEG_OF_TITLE%teste%END_OF_TITLE%hello world

    Fatal error: Call to undefined function: ns_show_top_commentators() in /home/content/b/l/o/blogconcurso/html/money/wp-content/plugins/widgetize-anything/widgetize-anything.php(31) : eval()’d code on line 4

    What can I do to continue using and solve this problem?

    Thank you
    Rodrigo

  7. Rodrigo, cualquier código php que vale en un archivo php normal vale para el contenido del widget. Práctica con código dentro de un bloque de <?php en footer.php.

  8. This is my first time using WP and first time using widgets. Despite the detailed steps on Erik’s page, I can’t seem to install the Widgetize Anything. Can anyone give me even more idiot-proof steps for installation on my Mac? Thanks.

  9. gestroud says:
    10

    I don’t think this plugin will work with WP 2.7. I had to remove it from my sites because it caused white pages in the admin area. Too bad, this was on of WordPress’ must-have plugins. :-(

  10. gestroud, it still works fine for me in WP 2.7.

  11. I like this plugin, but:

    I have a problem with this plugin and WordPress 2.7. I’ve entered php code into the widgetize anything widget in my sidebar, and now when I reload the sidebar in the admin to change the code, I’m being shown a string of php code and no option to edit the contents of the sidebar.

    Any ideas?

  12. I haven’t seen any behavior like that, eBiz. I suspect that your php code probably has a quote, either single or double, that is conflicting with 2.7’s javascript for widget editing. I’m not sure what to tell you. Maybe you can find and fix the php code in the database directly with phpmyadmin or something?

  13. Hi, Erik. Thanks for the reply.

    I don’t know what happened, but today I reinstalled the plugin and it works! And now my magazine is well on the way to being perfect!

    Thanks!

  14. gestroud says:
    15

    My apologies. I used widgetize anything for 4 different plugins on a few different sites – finally narrowed it down to one plugin that completely wrecked Widgetize Anything’s functionality with WordPress 2.7. After removing the suspect plugin, Widgetize Anything works fine. Your plugin remains as great as ever.

  15. Success BlogNet is a WordPress MU. Is this plugin compatible with MU?

    Everything I have been reading here is sounding quite positive and I look forward to your reply

    Best Regards,

  16. It looks like 2.8.2 breaks this plugin. Could be because of the new widget functionality (the ability to add multiple versions of the same widget). Any ideas how to adapt the plugin to work with the new version of WP?

    • Thanks, Ted. I have noticed this, but didn’t know about that change in functionality. The ability to add multiple copies of the same widget was what made this plugin so difficult to write in the first place. I keep hoping that WP will just adopt allowing PHP into their text widgets. It wouldn’t be that hard…

      I’ll see what I can do.

  17. Thanks so much, Erik. That was fast! I love your plugin; it’s become one of the staples of any and all blogs I set up.

    And yes, I’m totally with you: Can’t understand why WP hasn’t allowed the ability to add php into the default text widgets.

    Just out of curiosity, have you tried this plugin?
    http://wordpress.org/extend/plugins/php-code-widget/

    • I had heard of that, but never needed it. I just tried it, though, and it works great. 27 5-star ratings can’t be wrong!

      My solution to the 2.8.2 problem would just be to do what the PHP Code Widget already does, so I don’t see much point. I recommend switching to that one.

  18. Fantastic! I was shuddering at the thought of replacing ProgressFly, my favorite Wordpress plugin, until I found your widget. You made my day (actually month!)


10 Trackbacks/Pingbacks

  1.   WordPress Plugin: Widgetize Anything by Blogging Pro 01 12 06
  2. Wigetize Anything Plugin · Wordpress Workshop 02 12 06
  3. Wordpress Widgetizer on iface thoughts 03 12 06
  4. Code Widgetizer at Just Ducky 04 12 06
  5. BloggingPro China » WordPress Plugin: Widgetize Anything 06 12 06
  6. Full(o)bloG » Blog Archive » Cosa manca alla template? 07 12 06
  7. Emerging Tools and Technologies » Plugin: Widgetize Anything 29 12 06
  8. WP???????Widgetize Anything 13 02 07
  9. BLOGIK » Blog Archiv » Es ist vollbracht 14 02 07
  10. sein » Blog Archive » wordpress ??????? 16 02 07

Leave a Reply