Increase Text Widgets in WP from mere 9 to a number you wish

For those who switch over from Google’s blogger to Wordpress: one thing always annoy and that’s the limited number of text widgets. By default you only have 9 text widgets. I mean this is too little number. In blogger you enjoy the luxury of addition as many external HTML text widget as you wish. So I was looking for a plugin which can enhance number of text widget in Wordpress, but unfortunately there is no such plugin available (as far as I know).

Ultimately you have to experience this Wordpress hacking which will make you able to increase the number of text widget.

But before you do any WP hacking, its better you “Back up” original files!!!

1. You have to edit widgets.php file a little you will find widgets.php in the wp-includes folder find a chunk of code that begins with

function wp_widget_text_setup() Where it says
if ( $number > 9 ) $number = 9;
change 9 to x (x being the number of text widgets you want)

2. Next, find the chunk of code that begins with:

function wp_widget_text_register() change 9 to x in followings line:
if ( $number > 9 ) $number = 9;

3. Finally, look for this:

function wp_widget_text_page() Where it reads:

Change 10 to x+1 (i.e., one higher than your desired number of widgets)

IÂ WILL advise you to edit the file offline with your favorite editor. And then replace it with original. And yes please don’t blame me if the sky falls down on your head while doing so, though I hope you will be able to sail smooth with these instructions.

WP Text Widgets

Find out what I am doing right now by following me on Twitter! If you like this post then please consider subscribing to my full feed RSS. You can also subscribe by Email and have new posts sent directly to your inbox.

Share This Story:
  • E-mail this story to a friend!
  • Print this article!
  • LinkedIn
  • Google
  • StumbleUpon
  • Digg
  • del.icio.us
  • Facebook
  • MySpace
  • TwitThis
  • Mixx
  • Reddit
  • Sphinn
  • Furl
  • Technorati
  • Yahoo! Buzz
  • Pownce
  • BlinkList

15 Responses to “ Increase Text Widgets in WP from mere 9 to a number you wish ”

  1. This is interesting post, Shanker. I, myself, am not satisfied with only 10 text widgets so I usually put as many codes in one text widget. But I still need more, sure will try this trick. Thanks for this info.

  2. this is truly helpful… i’ve long been wanting to increase the number of text widgets in my WP installation… no plugin is available (as far as i know) that can accomplish this task

  3. I did the change as suggested. It shows up to 20 now in my drop-down for “Text widgets.” But when I selected 15 and saved the change — no additional text widgets showed up. There are still only 9 to work with.

    Everything still seems to be working correctly with the blog, but it just didn’t really create more than 9 widgets. No harm, no foul, I guess. But it doesn’t seem to work?

  4. it works, but you should be very careful making all the three changes required. I guess you mess up in code somewhere with RSS and Catagory codes which are exactly the same as for TEXT Widgets.

  5. I was thinking of looking for something like this and surprisingly came across it in here. I might give it a try, why don’t you create a widget out of it.

  6. I’m switching from blogspot to wordpress.org (self hosting)

    This would be great as a plugin then you (we) could add any number of categories, text and RSS widgets as we would like.

    Question: I changed my number of text widgets to 14. How do I get them to show up in the “Available widgets” area? Or did I just do something wrong?

  7. you have to make neccesary changes in your widget.php file, it will automatically increase the number in your widget panel like shown above.

  8. I had the same problem, then I figure out that something was missing in the post.
    On the “function wp_widget_text_register()”, besides making the changes shanker tells us in the post you also have to change the 9 on this line: for ($i = 1; $i <= 9; $i++) {
    than the widgets will appear on the available widget area.

  9. Thanks Laura, You are right, I missed it while writing the Post, Its Updated now.

  10. How do I edit the widget.php file in Wordpress 2.3.2?

  11. Edit it Off line, Copy the widget.php file on to your desktop and edit with a php editor software You can find one HERE then paste it again in your wp-include folder

  12. Thanks Shanker, this was just what I was looking for. The only thing I am wondering about is whether or not widgets.php is overwritten each time you upgrade Wordpress….? If it is, then you’d need to make these changes each time you upgrade.

  13. Bravo! Worked like a charm with zero hassles. Thanks!

    Robert
    http://www.ShouldYouStartACompany.com

  14. Thanks very much for this. It worked perfectly. Was working on a client site who is still using WP 2.3 and I had no idea how to allow for more than 9 text widgets. thanks!

  15. Thanks for using and appreciating it.

Leave a Reply

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>