The MU forums have moved to WordPress.org

Unlimited RSS Widgets? (6 posts)

  1. peiqinglong
    Member
    Posted 16 years ago #

    What do I modify so that I can have an unlimited amount of RSS widgets? I remember someone put out a plugin or hack a while back, but I can't find it now. Thanks!

  2. theapparatus
    Member
    Posted 16 years ago #

    Haven't seen a hack for unlimited rss widgets. Can you live with 100?

  3. theapparatus
    Member
    Posted 16 years ago #

    - Open up wp-includes/widgets.php for editing.

    - Search for this line:

    if ( $number > 9 ) $number = 9;

    Modify the '9' to what you want it to be. Do it with the 3rd and 4th occurances of that function. (The first two are for the text widgets.)

    - Go back up a couple of lines until you see the following:

    <?php for ( $i = 1; $i < 10; ++$i ) echo "<option value='$i' ".($options['number']==$i ? "selected='selected'" : '').">$i</option>"; ?>

    Modify the 10 to one more than the number that you want.

    - Save.

    Should work I would think.

    - A couple lines past the second occurance of that bit, you'll see the following:

    for ($i = 1; $i <= 9; $i++) {

    Modify the 9 there to what you want it to be.

    - And finally

  4. theapparatus
    Member
    Posted 16 years ago #

    It's out of order but you should get the right idea. Just make sure you're within the rss functions and not the text widgets when you do that editing.

  5. peiqinglong
    Member
    Posted 16 years ago #

    theapparatus, thank you! Perfect!

    It's funny, I was trying to do that, but I think I missed a line and that's why it didn't work the first time.

  6. MikeSims
    Member
    Posted 16 years ago #

    Hi. That solution works perfectly for Text Widgets too :)

    Incidentally, is there a way to change the default number of widgets so it's not always 1? That would be really handy :)

About this Topic

  • Started 16 years ago by peiqinglong
  • Latest reply from MikeSims