Forums

Additional widgets (6 posts)

  1. TheNewPundit
    Member
    Posted 4 years ago #

    Is there a plugin that will allow me to increase the amount of text and rss widgets?

  2. TheNewPundit
    Member
    Posted 4 years ago #

    Is that a no?

  3. Root
    Member
    Posted 4 years ago #

    Its an option in admin > widgets.

  4. TheNewPundit
    Member
    Posted 4 years ago #

    I'm sorry, I actually meant more than the 9 it currently allows.

  5. syntax
    Member
    Posted 4 years ago #

    There's no plugin that I'm aware of. For now you're gonna have to hack your widgets.php file - it's in the wp-includes folder. (If anyone with a little more experience with WP hacking than I do would like to confirm, deny or correct anything here, please feel free to do so.)

    Before you do anything, BACK UP THE ORIGINAL FILE!!! This is good practice anyway, in case you bork something.

    First, you'll want to 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)

    Next, find the chunk of code that begins with:
    function wp_widget_text_register()
    and change 9 to x in this line:
    if ( $number > 9 ) $number = 9;
    and this one:
    for ($i = 1; $i <= 9; $i++)

    Finally, look for this:
    function wp_widget_text_page()
    Where it reads:
    <?php for ( $i = 1; $i < 10; ++$i )
    change 10 to x+1 (i.e., one higher than your desired number of widgets)

    This SHOULD work. Again, if any of this is wrong please feel free to correct...

  6. TheNewPundit
    Member
    Posted 4 years ago #

    I'll look into that, but it may be more work than I feel comfortable doing.

    Thanks for your help.

Topic Closed

This topic has been closed to new replies.

About this Topic