Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter thenewpundit

    (@thenewpundit)

    Is that a no?

    Its an option in admin > widgets.

    Thread Starter thenewpundit

    (@thenewpundit)

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

    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…

    Thread Starter thenewpundit

    (@thenewpundit)

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

    Thanks for your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Additional widgets’ is closed to new replies.