WordPress.org

Ready to get started?Download WordPress

Forums

Integrate RSS feeds from other sites (30 posts)

  1. rendition
    Member
    Posted 8 years ago #

    Forgive me if this has been asked a thousand times, but what is the best plugin for aggregating RSS from other sites and displaying the content on my WordPress site?

    I would like to have the process be automated (cron?) and update the feeds daily. I understand how to manually import RSS, but that is not what I am looking for.

    The last thread I saw on this topic was from a guy who wanted to eliminate the link to the author's site. I thought that was absurd, and definatley not what I am after.

    Thanks in advance for any advice.

  2. mylagoon
    Member
    Posted 8 years ago #

    Can you clarify exactly why and what format you want this?

    Adding feeds, even with links, has been known to piss other bloggers off, often compounded by the fact that permission is often not sought from them prior.

    Doing such a thing in my opinion is paramount to copyright infringement and stealing. Unless you have permission to republish the feed on your site, it is a no go zone.

    If you're purpose is pure, and you just want to aggregrate your friend feeds and read them, may I suggest downloading a feed reader? That will suit your purpose.

    Otherwise, I honestly don't understand why anyone would want to republish others feeds on their sites. Surely you start a blog so that people log on to read YOUR content?

  3. cluelessone
    Member
    Posted 8 years ago #

    I'm not the OP, but I would also like to do this, and I do have a "pure" reason ;-) - I'd like to put the rss feed from other family members' blogs in my sidebar. I appreciate that it's a much-abused capability though.

  4. rendition
    Member
    Posted 8 years ago #

    I think the comment from mylagoon contradicts the true nature of blogging. If several sites have similar blog content, wouldn't they each benefit from syndicating each others feeds?

    For example, lets say you have a blog about widgets. You have a small following of people that frequent your blog. Another widget blog decides to display your content by using your RSS feed. Now you are getting some of their visitors linking through to your site. It makes sense to reciprocate, so you use the other site's RSS feed as part of your content. It is a WIN/WIN/WIN situation. You and the other site send traffic to each other. Visitors to either site have their widget information aggregated together in a more accesible manner. Thats also a WIN for them.

    I think if your comments were true, blog sites would not provide RSS feeds to their posts. But why would every blog want to live in its own exclusize vacuum? Thats not only contrary to blogging, its contrary to the World Wide Web.

  5. mylagoon
    Member
    Posted 8 years ago #

    rendition: There is a difference between linking to posts from other blogs of similar content, and republishing someone elses feeds onto your site.

    You can do this by writing your own posts saying something like "Hey, So and So over at bla bla.com recently wrote about...eg..go check it out, good read"

    If you simply set it up so that your blog republishes every post from another blog, then you're actually not sharing, it isn't WIN, WIN, WIN. You're in fact stealing traffic from the other blog. Why read the original blog, when I can read it on yours?

    Furthermore, you MUST ask permission from the feed owner before you attempt anything of this nature. Not only is it common courtesy, but a cardinal rule of blogging. Failure to do so is oft simple copyright infringement.

    Blogs don't have RSS feeds so others can republish their content. Blogs have RSS feeds so that people can read their content from an RSS reader or otherwise as it makes their content more accessible to the individual reader.

    Want to share content, make a WIN WIN situation? Publish your OWN post with a link and blurb everytime you see an article you like on another site.

    Publishing others feeds is not the answer to your needs.

    cluelessone: I'm not a PHP expert, I'll hunt around for an answer to your problem. For your purpose, I'm willing to help.

  6. mylagoon
    Member
    Posted 8 years ago #

    cluelessone: CG-Feedread might do what you want. You can download it as part of this package:
    http://www.chait.net/index.php?p=238

  7. cluelessone
    Member
    Posted 8 years ago #

    Thanks, mylagoon :-)

  8. thefreefood
    Member
    Posted 8 years ago #

    I personally like the FeedWordpress plugin. You can check it out here: http://projects.radgeek.com/feedwordpress

  9. davidchait
    Member
    Posted 8 years ago #

    if you just want it in the sidebar, CG-FeedRead does what you want. well, it can also be used in a page template (or with CG-QuickPHP inside page content) too.

    if you want to 'reblog', that is pull posts from other feeds and RE-POST them into your feed, storing them permanently as articles in your database, then you want something like feedwordpress or reblog. (FeedRead may eventually have a re-blogging module...)

    -d

  10. southbayblogs
    Member
    Posted 8 years ago #

    Forgive my newbie ignorance - I read through this thread and understood just a little of it!

    I'm trying to start a community weblog and split the blog into several "sub blogs" featuring different communities. On the main community page, I want to capture all the content posted on the subcommunity pages.

    Is using Feeds the best way to do this? Or is there another way that's easier but I just don't know it?

    Right now I'm manually copying and pasting new blog entries in the subcommunity blogs onto the main blog website itself to increase traffic. Understandably, this way sucks :)

    Thanks for helping me!
    *P.S. I signed up with Feedburner and still am not sure how to redisplay my feeds back onto my main blog page.

  11. Marcomail
    Member
    Posted 8 years ago #

    CG-Feedread works with WordPress 2.0.2 ?

  12. moshu
    Member
    Posted 8 years ago #

    @southbayblogs,
    I am curious how did you manage to have "sub blogs" with WP... but regardless, in your case probably the best would be to use feeds. Feeds are generated automatically by WP, so you don't have to worry about that part :)
    All you need is one of the feedreaders mentioned above to be installed on the "main" part to pull and display the feeds from the sub blogs.

  13. davidchait
    Member
    Posted 8 years ago #

    CG-FeedRead is 'version agnostic'. In fact, it's not tied to WP in any way, except the 'plugin stub' that basically just includes the cg-feedread.php file. ;) So yes, it'll work with WP202.

  14. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    It's worth mentioning that RSS reading is basically built into WordPress using the MagpieRSS functions. I used to use CG-Feedread as well (excellent stuff, David), but I switched to the built in capabilities since I like the way they work a bit better. MagpieRSS also has built in caching, so you won't be hitting somebody's RSS feed too often or anything.

    If you use Widgets in the sidebar, the built in RSS widget also uses those MagpieRSS functions.

  15. moshu
    Member
    Posted 8 years ago #

    Otto, would you mind adding something to the Codex or giving a brief tutorial somewhere about this - for code-illiterate users like myself? :)
    Thanks!

  16. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    Moshu: Sure. Here's some example code. This will read an RSS feed and spit out an unordered list of links to those items.

    $url = "http://example.com/rss/feed/url/goes/here";
    require_once(ABSPATH . WPINC . '/rss-functions.php');
    $rss = fetch_rss($url);
    echo "<ul>";
    foreach ($rss->items as $item ) {
    echo "<li><a href='".$item['link']."' title='".$item['title']".'>".$item['title']."</a></li>";
    }
    echo "</ul>";

    Just that simple, really. The breakdown is like this:
    -Include the necessary functionality from the rss_functions.php.
    -Call fetch_rss() to get the RSS feed (caching is automatic, it'll only fetch once per hour by default).
    -Do the output stuff.

    You can do a var_dump($rss->items) right after getting the feed to see the entire contents of what you get back. Then you can adjust your output to be nicer depending on what's in the feed.

    Also, the MagpieRSS functions are a bit outdated in the default distribution. They work fine with RSS, but with ATOM feeds you will find that they don't give back a lot of useful information and/or have parsing problems. I've fixed this in my Google Calendar Widget plugin by including an updated rss_functions.php drop in replacement file, but hopefully there will be a more permanent solution in later version of WordPress.

  17. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    I went ahead and added some info about it to the codex as well, in case somebody finds it useful: http://codex.wordpress.org/Function_Reference/fetch_rss

  18. moshu
    Member
    Posted 8 years ago #

    Thank you, Otto!
    I am sure a lot of users will really appreciate this guide.

  19. jwilliams
    Member
    Posted 8 years ago #


  20. kensav
    Member
    Posted 8 years ago #

    There's an error somewhere in this code saying that it was missing a , or ;

  21. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    ken: The code above has linebreak issues due to the forum. Get the one off the codex instead.

  22. jsalt
    Member
    Posted 8 years ago #

    First time user of word press and I'm not familiar with php. I'd like to receive an RSS feed on my site but I am having problems installing the reader. I installed the CG-Feedread Plugins and have actived them on my wordpress site. My problem is that I don't know how or where to insert the function code, if that is what I am suppose to do.

    Any advice?

  23. davidchait
    Member
    Posted 8 years ago #

    The doc should be one of my more decent ones -- that's not to say it's not lacking, but... ;)

    Where do you want the feed? In your sidebar? If your theme has a sidebar.php, then that's where to look to put the function call. If not, you need to find where in the theme the sidebar-related content is being displayed, and figure out where you want the feed to show up. Pretty much the same issue as if you wanted to add some new HTML into your sidebar in a particular location...

    -d

  24. jsalt
    Member
    Posted 8 years ago #

    Ok, so I would like to enter the rss feed directly into a page on the site, not on the side bar. I entered the call function directly into a page I had set up:

    http://kansansforfaithfulcitizenship.com/?page_id=7

    Is there something I'm doing wrong?

    js

  25. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    You can't enter PHP code directly into posts unless you have a plugin that will let you do that. Like Exec-PHP: http://www.soeren-weber.net/post/2005/08/18/50/

  26. davidchait
    Member
    Posted 8 years ago #

    There are a few different solutions.

    1. Make a custom page template. This is a php file that 'runs' when the page(s) linked to it are loaded. So, for instance, your page template could have a custom title, and run things like CG-FeedRead calls or other custom php.

    2. Use CG-QuickPHP. It can handle a single call to getSomeFeed with all parameters static (i.e., not variables themselves).

    3. Use one of the more-complex PHP runner plugins, which allow you to use unlimited php in posts/pages. I generally prefer not to go that far, as at that point I'd rather just use a custom template. ;)

    -d

  27. jsalt
    Member
    Posted 8 years ago #

    Thanks- it's up and running. I never thought it'd be this user friendly!

    http://kansansforfaithfulcitizenship.com/?page_id=7

    Are the number and length of the headlines defined by the feed provider or is that something I can manipulate?

  28. jsalt
    Member
    Posted 8 years ago #

    Hey David and Otto-

    I installed the soeren-weber.net/post/2005/08/18/50/ plug in but now the rss feed links are read as directories, not as external links.

    Any advice?

    kansansforfaithfulcitizenship.com/?page_id=7

  29. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    Well, it would help if you explained what exactly it is that you are trying to do. That page looks okay to me, except that you've got the "Catholic Media Report" listed twice.

  30. davidchait
    Member
    Posted 8 years ago #

    The publisher controls the INITIAL state: how many total items are in the RSS feed, what titles, what kind of content. From there, CG-FeedRead provides FURTHER control to you: how many items to show of those available, should it show just headlines or content as well, headline length trimming, content length trimming, etc. I think the doc touches on at least those four points.

    -d

Topic Closed

This topic has been closed to new replies.

About this Topic