• I really wanted to add more rss feeds than comes standard with Automattic’s sidebar widget plugin (http://automattic.com/code/widgets/) So I did. Works great. Installed on 2.04

    Please back up your original widgets.php file first.

    In /wp-content/plugins/widgets/widgets.php

    Find:
    if ( empty($items) || $items < 1 ) $items = 10;

    Replace the number ’10’ in that code with ONE NUMBER MORE than the total feeds you want. Example, you want 15 feeds, replace with the number 16.

    Find:
    $number = (int) $_POST['rss-number'];
    if ( $number > 9 ) $number = 9;

    Replace both instances of the number ‘9’ with the EXACT NUMBER OF FEEDS that you want. Example, you want 15 feeds, replace with the number 15.

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

    Replace the number ’10’ in that code with ONE NUMBER MORE than the total feeds you want. Example, you want 15 feeds, replace with the number 16.

    Find:
    $number = $options['number'];
    if ( $number < 1 ) $number = 1;
    if ( $number > 9 ) $number = 9;
    for ($i = 1; $i <= 9; $i++)

    Replace all instances of the number ‘9’ with the EXACT NUMBER OF FEEDS that you want. Example, you want 15 feeds, replace with the number 15.

    Done!

    It seems like a lot of edits, but it really looks worse than it is. Very easy as well.

    After you are done–you can add the rss boxes in your usual drop down locations 🙂

    See it in action on my site at http://www.chargersweblog.com

  • The topic ‘Add more RSS Feeds for the Widget Sidebar Plugin’ is closed to new replies.