Support » Plugins » Widgetizing the BDP RSS Aggregator Plugin

  • I installed the new Widgets plugin from Automattic and was trying to figure out how to turn output from the BDP RSS Aggregator plugin into a widget for use in the sidebar.

    After reading all the Widgets documentation (especaially about widgetizing plugins) I tweaked out the following code and it works perfectly:

    function widget_bdprss2_1($args) {
    <?php echo $before_widget; ?>
    <?php echo $before_title
    . 'Syndicated News'
    . $after_title; ?>
    <?php BDPRSS2::output(1); ?>
    <?php echo $after_widget; ?>
    register_sidebar_widget('Syndicated News',

    To use the code, just drop it as is into your theme’s functions.php file. (And, of course, have the BDPRSS2 plugin installed and configured to use channel 1’s output…and the Widgets plugin installed and your sidebar.php and functions.php updated.)

    If you want to use multiple widgets, just change the channel in <?php BDPRSS2::output(1); ?> from 1 to 2 (or 3 or 4, etc.) depending on how many you want to use…and change the 1 in widget_bdprss2_1 to match the channel you specified in the output code (this is just to keep everything organized). Changing “Syndicated News” to match the feed output on each would also be prudent.

    Anyway. I thought this was nifty…and it being one of my first attempts at (semi)custom coding (that actually works), I decided to share it.

    Hope you find it useful!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thanks for sharing this with us, Media. I will try it and then let you know about it.


    Yep, cool.

    Any plugin that already does a function call for output can pretty simply be thrown into a widget. I plan to have them for CG-Amazon, CG-FeedRead, CG-Referrer, etc., but anyone with a little PHP knowledge can do exactly what you did with BDP. Good for folks to see an example, as they can go and build widgets as needed, for pretty much any plugin or code library…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Widgetizing the BDP RSS Aggregator Plugin’ is closed to new replies.