Welcome, visitor! Log in
 

KB Plugins blog

The best Wordpress plugins are free

KB Advanced RSS Widget

The Sidebar Widgets plugin comes with an RSS widget, but you get no control over how the feed shows up in your sidebar. Want more control? The KB Advanced RSS widget gives it to you. With it, you can

  • Decide which RSS fields to display (as opposed to the default RSS widget, which limits you to link and title), and
  • Decide how to format the fields (it doesn’t have to be a list if you don’t want it to be).

Be aware that it’s called “advanced” for a reason. You need to know some basic HTML, and possibly a little PHP, to use this fully. These examples will show how it works. There’s a demo of Example 3 in my sidebar.

How to Download It

Download it from the KB Advanced RSS page at WordPress.org . That’s also the place to look for documentation.

Please post your comments about this widget to the appropriate post in the KB Advanced RSS category. I’ve turned off commenting on this page because the page was getting too big.

71 Comments

  1. Marcomail
    Posted April 7, 2007 at 2:53 pm | Permalink

    Adam there is a way to show this feed with your script ? (link moderated)

  2. Marcomail
    Posted April 7, 2007 at 2:55 pm | Permalink

    Is possible use your plugin without widjet ? I thought to use your feedreader in a wordpress page, not in the sidebar

  3. Posted April 7, 2007 at 3:05 pm | Permalink

    To find out, use the ?kbrss= thing described above. If you don’t get anything, then no, it doesn’t parse as an RSS feed.

    Hmm. I just tried it. Doesn’t appear to work. Sorry.

    As far as not using the widget, no, the way I’ve coded it, it has to be a widget. But you could probably tweak it to work differently if you wanted it to. Copy the function, give it a new name, delete the widget-specific parts, and it should work.

  4. Marcomail
    Posted April 7, 2007 at 4:36 pm | Permalink

    i already try ?kbrss= but the script reload part of the homepage…i think it doesn’t work with my feed

  5. Posted April 7, 2007 at 5:04 pm | Permalink

    No, it looks like it’s not actually RSS, but some other XML format.

  6. Marcel van Leeuwen
    Posted April 11, 2007 at 1:48 pm | Permalink

    Hello Adam,
    I have installed your plugin. The plugin shows in my Sidebar Widgets, but it seems that the data I enter doesn’t save. The feed doesn’t show up after I saved.
    I am using WordPress version 2.1.2. What do I do wrong?
    Thanks for your help.

  7. Posted April 11, 2007 at 2:37 pm | Permalink

    Marcel, Are you able to use the normal RSS widget without any difficulty?

  8. Marcel van Leeuwen
    Posted April 14, 2007 at 1:50 pm | Permalink

    Adam,
    My apologies for this delay, but yes when I use the normal RSS widget, it works without any problem.

  9. Posted April 15, 2007 at 8:34 am | Permalink

    Marcel,
    I’ve been out of town for a few days and have a backlog of work to do. But I’ll see if I can figure this out in a few days.

  10. Pete
    Posted April 17, 2007 at 11:55 am | Permalink

    Greetings Adam,

    I am having the same difficulty as Marcel, also running WP 2.1.2. When I configure the feed and Save Changes, it appears to save but nothing shows up in the widget and when I go back to configure again, my changes are lost and the default settings appear. The regular RSS feed works for me as well.

    Thanks for making this plugin available. I hope I can get it to work on my site!

  11. Posted April 17, 2007 at 2:50 pm | Permalink

    Pete and Marcel:

    I’m not running WP 2.1.2, so it’s hard for me to know exactly what’s going on. I have a hunch, though it might be wrong.

    I’d be curious to see the HTML source that is rendered by my plugin on your “widgets” page. If you could go to yoursite.com/wp-admin/themes.php?page=widgets/widgets.php, then look at the HTML source, that would be helpful. I don’t need to see the whole page’s source (and you probably don’t want to show me the whole thing), but search in the file for a line like this:

    <span class="controlhandle">KB Advanced RSS 1</span>

    That line indicates the beginning of the widget’s form. The form ends about 20 lines later, with this:

    <input type="hidden" id="kbrss-submit-1" name="kbrss-submit-1" value="1" />

    If you could paste the intervening lines of code into [link], I can look at it and see if my hunch is right.

    (My hunch is that something in 2.1.2 is causing the form to render slightly funny, which screws everything up. But I need to see the rendered HTML to find out.)

  12. Neil
    Posted April 18, 2007 at 5:06 am | Permalink

    I have exactly the same issue as mentioned above. WP ver 2.1.3

    Pasted info requested; [link]

  13. Posted April 18, 2007 at 8:57 am | Permalink

    Thanks Neil. Now I am truly stumped. Everything in the pastebin looks as it should.

    So I installed WP 2.1.3 to a beta location for testing and I was unable to replicate the problem. It would appear that the problem is not caused by the different versions of WordPress that we’re using (I usually use WP-MU).

    As such, I suspect that there might be something going on with our versions of PHP. What version of PHP are you folks using?

    Also, I made a few tweaks to the plugin which might help if you’re using an older version of PHP. So if you’re using pre-PHP 5, try using v1.0.1.

  14. Neil
    Posted April 19, 2007 at 1:17 am | Permalink

    Hi Adam,

    PHP version on the server is 4.3.11-1 (it’s an older fedora core 2 box which is due to be upgraded in the next few weeks.)

    I’ve tried ver 1.0.1 with no change.

    I do have an up to date centos server, but that php version is shown as 4.3.9-3.22.3

    This plugin looks to be exactly what I’m after so if you want me to test anything, do let me know and thanks for the effort of trying to resolve this.

    Cheers

  15. Posted April 19, 2007 at 12:19 pm | Permalink

    I am having the same difficulty as Marcel and Pete, also running WP 2.1.3 and, i´dont know my PHP. For me, the difficult is very very bigger, but i brazilian, e i´dont speack and writen english very well. Sorry!

  16. Posted April 20, 2007 at 9:26 am | Permalink

    I’ve got another (non-blog) site running 4.3.11. I’ll set up a beta blog over there and see if I can replicate the problem.

  17. Posted April 20, 2007 at 9:48 am | Permalink

    Okay, I have replicated the problem, so I can confirm that this is definitely a problem caused by using older versions of PHP. Now let’s see if I can fix the thing…

  18. Posted April 20, 2007 at 9:57 am | Permalink

    FIXED! Download v1.1.

    For the curious, it appears that pre-PHP 5 supports htmlspecialchars(), but not htmlspecialchars_decode().

  19. Posted April 20, 2007 at 11:54 am | Permalink

    Very good, it is functioning perfectly! It would like to make a question: exists some RSS Feed for wordpress that it converts encodings of the archives xml? for example, of UTF-8 for ISO-XXXX?

  20. Posted April 20, 2007 at 11:59 am | Permalink

    My question is because mine wordpress is configured for UTF-8, but same times, some feeds of other sites, configured with the ISO-XXXX, do not show to all caractéres of the phrases.

  21. Neil
    Posted April 23, 2007 at 12:35 am | Permalink

    Perfect, working nicely now :) Many thanks Adam.

  22. Posted April 23, 2007 at 8:24 am | Permalink

    Glad to hear it, Neil.

    Kmuriel,this is possible in practice, but it may be a while before I can tinker with it. If you’d like to try, take a look at this: [link]

  23. Posted April 29, 2007 at 6:59 pm | Permalink

    Adam-

    Would it be possible to integrate this plugin into KB Advanced RSS Widget?

    [link]

    I would really like to be able to add toggle boxes (expand/collapse) to the RSS output. Thanks for the great plugin and I look forward to hearing back.

    One other question – where do I edit the CSS for the title? I don’t want the feed title so large.

  24. Posted April 30, 2007 at 11:05 am | Permalink

    Taylor,

    You could certainly add toggle boxes. (And there are easier ways than what you’ve linked to.) The idea of the widget is that you do whatever you want to with the output. So simply insert whatever you want that will make it toggle into the widget’s options. Maybe where it says “what HTML should precede the feed” you’ll write something like this:

    <div class=”hideme”><a href=”javascript:toggleshown(this)”>Hide</a></div>

    You would then insert a javascript function called toggleshown into your theme’s header. But this is something that needs to be done in your theme and in the widget options, not in the plugin code.

    As for the CSS, your theme controls how widget titles appear. If you want this one particular widget to have a different looking title than other things in your sidebar, put something in your stylesheet that talks to .widget_kbrss{}, which is the class wrapper around the whole widget. You’ll probably need something like this, although whether “h2″ is the appropriate tag depends on your theme:

    .widget_kbrss h2{font-size:80%;}

  25. Posted May 1, 2007 at 1:02 pm | Permalink

    Adam-

    Thanks for the info – just about have it like I want it. Last question for you. What if I want more than 9 RSS feeds? Can I increase that number?

    Thanks.

  26. Posted May 1, 2007 at 2:04 pm | Permalink

    Taylor, I just looked at your site, and that is really cool what you are doing with the widget. Now I see why you were suggesting integrating it into the widget itself; I just might do that.

    As for having more than 9, yes, you can do it. You’ll need to make a couple changes to the plugin file. Open it up and do a search for “9″. You’ll find it four or five times between lines 267 and 299 (or so). (You’ll see a few 9′s in the lines right after where it says “function widget_kbrss_setup() {“, and then again around 20 lines later after where it says “function widget_kbrss_register() {“). Change them all to whatever you want the upper limit to be.

    You also need to find this: <?php for ( $i = 1; $i < 10; ++$i ) echo ... (it will be between the areas that you just edited). You’ll need to change the 10 in this line. Note that 10 = 9 + 1. Add 1 to whatever you changed the 9′s to, then substitute that in for the 10.

    That should do it.

  27. Posted May 1, 2007 at 2:16 pm | Permalink

    Thanks for your help Adam. I really wanted to be able to have expand/collapse on my blogroll, so I’ve modified a few things to get it to look right, even though it’s really not programmed right. (Given my little programming knowledge, I have to work with what I’ve got…) Anyway, I’ve got it working just like I want it now. It would be a great feature in a future release! By the way, there a few of places that “10″ needs to be replaced. Once I changed those, I’ve got plenty of feeds to work with!

    Again, thanks for your help and the widget!

  28. Dennis
    Posted May 14, 2007 at 2:27 am | Permalink

    How do I display the RSS feed with no title? I don’t want the title to show.

  29. Posted May 14, 2007 at 9:11 am | Permalink

    Dennis,

    Fixed. Download v 1.2.

  30. Dennis
    Posted May 14, 2007 at 9:35 pm | Permalink

    WOW! Thanks for the quick response.

    The title doesn’t show but it still leaves an empty space. Is there anyway to delete this “space” or keep the title information from loading? I’m trying to get all the “blocks” lined up.

    [link]

    This is the feed:

    [link]

    Also is there an easy way to remove the bullet points.

    Sorry I’m a little new at this:-)

    Thanks

  31. Posted May 15, 2007 at 7:43 am | Permalink

    These are probably CSS issues. I would need to see the page source, not just an image, in order to try answering. What’s the link to your site?

  32. Posted May 15, 2007 at 3:22 pm | Permalink

    Hey there – I’m having some difficulty getting this up and running – my RSS feed that I’m trying to load is: [link]. Maybe I’m missing something?

  33. Posted May 15, 2007 at 3:34 pm | Permalink

    Christopher,

    The feed looks like it should work. Perhaps you could be a little more specific about what the problem is. Are you getting an error message?

  34. Posted May 15, 2007 at 4:03 pm | Permalink

    Error Message: An error has occured; the feed is probably down. Try again later.

    But the feed is not down – it works all too well on my other page: [link]

  35. Posted May 15, 2007 at 5:25 pm | Permalink

    Christopher,

    This widget relies on WP’s underlying RSS reading infrastucture (which is derived from the MagpieRSS package). WP fetches the feed you request, and then the widget displays it using the options you specify. The error message you received occurs when WP does not pass valid feed data to the widget.

    In other words, this problem is not caused by the widget. You can verify this using the ?kbrss= thing mentioned in my instructions at the top of this page. Click on this: [link] (you’ll have to be logged in to your blog for this to work). If you see a whole bunch of funny code, then WP is getting the feed. If you don’t, then something is preventing WP from doing it.

    The likely reason is that your host is not allowing the server to contact the feed. But now we’re stepping into an area that I don’t know much about, so I apologize that I can’t be much help.

  36. Dennis
    Posted May 16, 2007 at 4:40 pm | Permalink

    My site is not “up” yet, while I’m working on it the code is a mess.

    The bullet points are a css issue, but the title has something to do with the rss feed. Even though the title is blank, the feed still creates a place for it. The title still loads, the software just clears the title text.

    Thanks again for your help.

  37. Posted May 17, 2007 at 8:02 am | Permalink

    Adam

    I have your plugin working fine in Firefox and in Opera, but not in IE or Avant Browser. I have a three column theme, with the standard RSS plugin in column 2, and yours in column 3.

    The site is: [link]

    I’d appreciate any comments before I dismantle in byte by byte.

    Cheers. Matt

  38. Posted May 17, 2007 at 8:19 am | Permalink

    @Dennis:

    It shouldn’t be creating a place for the title. What version of PHP are you using? And again, if you can give the link so I can see what exactly the widget is producing (the actual HTML), then that would help.

    @Matt:

    The main difference I see between FF and II is that the #outer part of the sidebar drops down below the #inner part in IE. As far as I can tell, my plugin is doing the same thing in both browsers, it’s just in a different place (along with all the other #outer content, like “Pages” and “Meta”).

    The problem is probably your floats. Maybe this will help: [link]

  39. Posted May 17, 2007 at 9:20 am | Permalink

    Adam

    Thanks – sorted. Someone had a broken RSS feed that was breaking my container.

    Cheers. Matt

  40. Israel
    Posted May 21, 2007 at 11:58 am | Permalink

    Hi Adam,
    Have you gotten any reports of kb-advanced-rss being broken with wp 2.2? I’m having a weird error where adding multiple instances of the widget is giving me identical readouts for each instance, even if they’re looking at different feeds. So if the first widget is pointing at blog, headlined BLOG and with entry 1 “Widget News Release” any other instance of kb rss will give the same…

  41. Posted May 21, 2007 at 5:16 pm | Permalink

    This is the first I’ve heard. I didn’t even know that 2.2 was out yet. It might be a while before I can try figuring this out….

  42. Posted May 22, 2007 at 1:17 am | Permalink

    Hi!
    A great plugin!
    1. But how do I put in the TARGET=”_blank”> so the feeds will open i a new window?
    2. And is it possible to have the same feature on a page instead of in the sidebar?

    Thanx

  43. Israel
    Posted May 22, 2007 at 8:07 am | Permalink

    Bated breath for the fix:) I’ll be checking back frequently! I’m pretty certain now that yours is the only widget-friendly rss plugin that allows any formatting of the feed and isn’t (I think) catastrophically broken right now (since it works correctly with only one instance, but not with more than one). As people upgrade to 2.2, they’re going to be out of luck if they want to format their RSS sidebar feeds at all, as king widgets and the other frameworks are directly broken by the release. Only way to make them work is to deactivate the core WordPress widget framework – and that kind of sucks. it’s awfully nice to be able to drag stuff to the correct locations.

  44. Posted May 22, 2007 at 9:23 am | Permalink

    Israel: Download v1.3 from wordpress.org. Turns out that they made some changes to the widgets framework with 2.2 which aren’t friendly to plugins with multiple instances. But there’s a workaround in v1.3.

    Jesper: You need to use single quotes, not double quotes. Try target=’_blank’ and it should work.

  45. Posted May 22, 2007 at 9:44 am | Permalink

    I should point out that the workaround in v1.3 will not work with every theme. Moreover, it is a very fragile workaround that may not work in future versions of WP. I’ve told the wp folks about the bug, so let’s hope the fix it soon so that this is no longer an issue.

    If you download v1.4 of this plugin, the problem should be completely solved.

  46. Posted May 23, 2007 at 2:13 am | Permalink

    Thank you, Adam, but it still doesnt work.

    Where do i add target=’_blank’ ?

    Do I add it after the RSS feed URL?
    [link] target=’_blank’

    - or, is it at “What HTML should follow the feed”?
    target=’_blank’

  47. Posted May 23, 2007 at 8:13 am | Permalink

    It needs to go into each item’s link. If you’re using the default code, which looks like

    <li><a href='^link$' title='^description$'>^title$</a></li>

    then you would change it to

    <li><a href='^link$' target='_blank' title='^description$'>^title$</a></li>

    As for your earlier question #2, the widget doesn’t do that, but you could tweak it on your own and probably get something like that to work.

  48. Posted May 23, 2007 at 3:26 pm | Permalink

    Hi! You’ve made good job but I don’t understand why my widget (v1.4) doesn’t update… :’(

  49. Posted May 23, 2007 at 5:58 pm | Permalink

    To keep page loads quick, the widget stores a copy of the feed in cache. Only when the cache is more than 1 hour old will the widget update. You can change this. Search the widget file for “3600″ and change it to the number of seconds that you want it to cache. (3600 seconds is 1 hour).

  50. Posted May 23, 2007 at 11:30 pm | Permalink

    Thanks, you’re fast ! I appreciate that kind of support of your widget. I will look at this refresh time parameter now.

  51. Posted May 24, 2007 at 5:01 am | Permalink

    Thanx Adam, now it works!
    Great support.

    Jesper

  52. Posted May 26, 2007 at 5:23 pm | Permalink

    Hello,

    Thanks for the great widget.

    I’m just having problems toggling the item descriptions here: [link] (rss title: Read Or Die). I’m using a javascript function to toggle the descriptions. Problem is, only the latest item toggles properly. Everything else goes back to top (even when I stripped href=”#” and just used onclick). Any possible solutions? Thanks again.

  53. Posted May 27, 2007 at 10:45 pm | Permalink

    Adam

    That is now working fine – thanks for the help. It was a problem in CSS.

    Cheers. Matt

  54. Posted May 29, 2007 at 6:13 pm | Permalink

    saintclow,

    I don’t see it on your site, so I can’t really comment. And look at the comments above (here). This has already been discussed.

  55. Posted June 5, 2007 at 2:09 pm | Permalink

    Hi Adam,
    Congrats on a great plugin! Is there any way to stop it from stripping out the HTML formatting? I need to keep my line breaks.

  56. Posted June 5, 2007 at 2:28 pm | Permalink

    Israel, it strips tags to make it safe for multi-user blog farms. If you wish to disable that, open the file, search for “strip_tags( … )”, and delete it. Make sure you keep all the stuff between the parentheses, though.

  57. sph
    Posted June 7, 2007 at 6:14 am | Permalink

    hi,
    i’d like to know if it is possible to make a “scroller news box”, in order to realize some dynamic effects for my wordpress-website, starting to a rss feed, using this widget.
    thanks
    sph

  58. Posted June 7, 2007 at 8:54 am | Permalink

    sph: You would have to code that yourself. This plugin differs from the standard RSS plugin in that it lets you decide which RSS fields to display, and what HTML to use to display them. It does not include any javascript or flash functions. See previous comments for links that might help you with what you are doing.

  59. Posted June 8, 2007 at 8:29 am | Permalink

    We really appreciate your work on this plugin, and we are pleased to inform you that – due to many ask by our clients – we made an unobtrusive javascript news ticker implementation based on top of your work and on Chris Heilmann’s DOMnews ([link]), obviously released to public under GPL. It’s actually an alpha-quality release, but it just works for now, more beauty later on.

    You can find and download it on [link]

    Hope you’ll enjoy it! :-)

  60. Posted June 8, 2007 at 8:54 am | Permalink

    @sph: There you go.

    Pixline: Looks good. Combining my widget with Chris Heilmann’s code looks smooth for those that like to have things moving around on their sites. But I looked at your coding, and you’re going to have problems if people want to use more than one instance of the widget (you’ll end up with multiple div’s having the same ID). Plus, it looks like you may want to tweak the widget options to force people to use list tags, since it looks like the scrolling action requires that.

    Those considering using the Pixline variant should be aware the Chris Heilmann has expressed reservations about using scrolling code at all. You can read it here.

  61. Posted June 15, 2007 at 12:50 pm | Permalink

    I have taken notes of both your comments and suggestions, and I’ll surely do another release soon.
    We are considering another interconnection module (like custom hooks or something similar) between the real widget (yours) and our little implementation. Hope we have a draft soon. Thank you!

  62. Anders
    Posted June 19, 2007 at 8:28 pm | Permalink

    I have problem with the widget. Feeds with special characters are not displayed correctly.
    Feeds which contains charctes like åäö translates to ???. I have set the browser and wordpress to UTF-8 encoding.
    Example feed:
    [link]
    I have the newest version of this widget: v 1.52

    If I change my browser to display ISO-8859-1 encoding it displays correctly, but then all other characters on wordpress screws up.

  63. Anders
    Posted June 20, 2007 at 6:47 am | Permalink

    I want to add that this only happens on feeds that are specifiying other encoding than UTF-8.
    Hope you can fix this bug.

  64. Posted June 21, 2007 at 5:10 pm | Permalink

    Hi,
    Just updated to WordPress 2.2.1 and it seems to have stopped working. Widgets available from the menu etc but it doesn’t show in our sidebar. Other widgets work so it must be this. Tried looking for a quickfix in the code but so far can’t find anything to fix. Any ideas?
    Cheers,
    Ed

  65. Posted June 21, 2007 at 5:13 pm | Permalink

    Ed: I fixed that a few hours ago (assuming you’re not using the newest version). Download the new version. If that doesn’t work, let me know.
    Anders: See the comment above

  66. Posted June 21, 2007 at 5:39 pm | Permalink

    Ah excellent! Yep it’s working great sorry for not reading above quite tired :P
    Thanks again great plugin!
    Ed

  67. Posted June 21, 2007 at 5:47 pm | Permalink

    Just a question, I know it hasn’t got anything to do with you but i’ve tried asking on the WordPress support forums… Currently on our site if we write a post and save or publish it our widgets seem to reset themselves, which is quite annoying as we are continuously writing new posts etc. Thus we have to re-enable the widgets on every new post. Have you ever come across this or know of any way of fixing it? It’s extremely fustrating and no one is willing to help us fix it. I’ve tried disabling all plugins etc and as far as I can see it isn’t that. Also no themes are doing it and all WordPress files are default to their correct version. Any ideas?
    Ed

  68. Posted June 21, 2007 at 6:14 pm | Permalink

    That’s a weird error. I’m not sure what to tell you other than to keep trying on the WordPress support forums. First thing to check is that you’re running PHP 5, not 4, since that can cause weird errors. But beyond that, I’ve got no idea.

  69. Posted June 21, 2007 at 6:27 pm | Permalink

    Ok was worth a try thanks, yeah we’re running php5. Have no idea when it started, installed some debug plugins see if i can work it out with that.
    Anyways cheers mate,
    Ed

  70. Posted June 23, 2007 at 5:20 pm | Permalink

    About the problems with WordPress 2.2.1

    I guess this this could explain something:
    [link]

    in any case, without warrenty, this is my solution at time:
    replaced wp-includes/widgets.php with the old version

  71. Posted June 23, 2007 at 6:25 pm | Permalink

    par7133: Already fixed. You need to update to the most recent version of the widget.