Widget Plugin – How to add the additional text-widgets for your sidebar?
The Text-widget is the most useful widget in Widget plugin. It allows you to place the HTML code or Javascript on your sidebar. In my blog, I have used a lot of text-widgets for showing links, feed count, adsense, license, stats and so on. As you were like me, you may probably need more text-widgets for your sidebar. Unfortunately, there are only 9 text-widgets available in your widget by default. How do we do to get the additional text-widgets more than 9?

The answer is simple. You need to make a few minor changes in the code of widget plugin. Don’t worry if you are not programmer. It is very simple and everybody can do it… I will show the steps how to change and what to change the source code of widget plugin. Actually, there are only 3 lines to change so you just follow all those steps carefully and get it done.. :) Don’t forget to backup your code.

Note: Widget.php is located under wp-includes if you are using Wordpess 2.3. (Why not in plugins folder? Because the widget plugin is natively supported by wordpress started from version 2.3. ) To edit this file, you have to download this file to your local machine and have to upload it back after editing. You can’t use the plugin editor to edit this file.
Steps to follow ~
- Download widget.php file to your local machine and open it with your favorite text editor
- Find “wp_widget_text_setup” function. Change “9″ to “the number of text widgets you want” in this line “if ( $number > 9 ) $number = 9;”

- Find the “wp_widget_text_register” function. Change “9″ to “the number of text widgets you want” in this line “if ( $number > 9 ) $number = 9;” and “for ($i = 1; $i <= 9; $i++)”

- Find “wp_widget_text_page” function. Change 10 to the number which is one higher than the number of text-widget you want in this line “<?php for ( $i = 1; $i < 10; ++$i )”. (For example, if you want 20 text widgets, set 21 in that line. )

Finally, you can upload this file to your host after editing.. (Thanks to “Syntax” for this post. I got those steps from his post in wp.org forum. ). That’s all about adding the extra text-widgets. Let me know if you have any problem with those steps that I mentioned in this post. Thanks.
Reference ~
Links ~
October 23rd, 2007 at 11:59 pm
Hi Mike,
Long time no contact. Missing you naw.
If I have time, I will try this widget.
Although It is very simple and everybody can do it, as for me, using freedom to do it, I think so slowly like turtle due to connection. :P
Nomatter what, thanks for your this post.
October 28th, 2007 at 10:56 pm
Hey buddy, yeah.. ntnc…. miss you too.. i mailed about the commenting system of your blog but got no reply…. I was not able to drop a comment in your english blog at that time…… have you made some changes??
>>If I have time, I will try this widget.
cool.. Have you started using Wordpress?
>>thanks for your this post.
Your welcome, buddy
November 5th, 2007 at 8:28 am
[...] -How To Rent A Domain Name by Bucky -Laptop Batteries : How To Make them Work Even Longer by Fauzi -Wordpress Widget Plugin – How to add the additional text-widgets for your sidebar by Michael Sync -How to quickly run frequently used apps without the pesky mouse by Michael [...]
November 14th, 2007 at 3:38 pm
Good plugin!!!
Widget is a great part of WordPress!
Thank You!
November 26th, 2007 at 5:36 am
Hi, cool trick. I link the tutorial and translated into Indonesian Languange in my website.
November 26th, 2007 at 5:58 am
[...] Search sana sini, akhirnya nemu disini: http://michaelsync.net/2007/10/20/widget-plugin-how-to-add-the-additional-text-widgets-for-your-side... [...]
December 12th, 2007 at 7:24 am
Brilliant! Thanks so much.
March 30th, 2008 at 8:41 am
Thanks for the easy-to-follow tips. Everything worked perfectly!
Mark
July 14th, 2008 at 10:40 pm
Excellent fix in about a minute!!! Thanks!!