WordPress.org

Ready to get started?Download WordPress

Forums

Create an RSS feed page to view subscribed blogs (22 posts)

  1. itissue
    Member
    Posted 6 years ago #

    Is there a way to create a page that shows RSS feeds of all the blogs you subscribe to? If so, how would I format the code? I tried what this page suggests, but it didn't work. I got a parsing error. Any sort of help is much appreciated. Thanks.

  2. itissue
    Member
    Posted 6 years ago #

    I found a way to create an RSS feed page, but now I want to be able to display full entries in the feed. I also want to display the date the entries are posted, and possibly the number of comments the entries have received, though this is not important. Right now this is how one entry is coded:

    <?php
    require_once (ABSPATH . WPINC . '/rss-functions.php');
    $url = 'http://www.phucnguyen.com/?feed=rss';
    $rss = fetch_rss( $url );
    if ( $rss ) {
    echo "<h4>" . $rss->channel['title'] . "</h4>";
    $i = 1;
    foreach ($rss->items as $item) {
    $href = $item['link'];
    $title = $item['title'];
    $description = $item['description'];
    echo "<a href=\"$href\">$title</a>$description";
    if ($i == 1 ) break;
    $i = $i + 1;
    }}?>

    Here's the link to my RSS feed page:
    http://suefeng.com/affiliates

    I'm guessing I have to change $description to something else, but I'm not sure if this is the case. I'm not sure of how to add a date stamp though.

    Once again, any sort of help is much appreciated.

  3. Sridhar Katakam
    Member
    Posted 6 years ago #

  4. itissue
    Member
    Posted 6 years ago #

    Thanks but it doesn't seem to show the post date or full entries in the examples listed. I tried using the plugin on my blog but it didn't work at all.

  5. itissue
    Member
    Posted 6 years ago #

    I tried the wp-feedreader plugin. It's great in that it takes feeds from your blogroll, and also creates a page under dashboard to view all the entries your friends have posted. You can also search for terms in the entries. The problem is, this plugin is outdated and I got three database errors. I was wondering if anyone could help me with that, since I don't know much about MySQL. Here's my error message:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' wp_linkfeeds WHERE wp_links.link_id = wp_linkfeeds.link_id A]
    SELECT wp_links.*, link_name, link_url, cat_id, cat_name, link_favicon FROM wp_links, , wp_linkfeeds WHERE wp_links.link_id = wp_linkfeeds.link_id AND wp_links.link_category = .cat_id AND item_read = 0 AND wp_links.link_category = 0 ORDER BY item_date DESC

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' .cat_name, wp_links.link_id, link_name, count(*) as num_unr]
    SELECT SQL_BIG_RESULT .cat_id, .cat_name, wp_links.link_id, link_name, count(*) as num_unread FROM wp_links, wp_linkfeeds, WHERE wp_links.link_id = wp_linkfeeds.link_id AND wp_links.link_category = .cat_id AND item_read=0 GROUP BY cat_name, link_name

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' .cat_name, wp_links.link_id, link_name, link_url, link_favic]
    SELECT SQL_BIG_RESULT .cat_id, .cat_name, wp_links.link_id, link_name, link_url, link_favicon, link_rss FROM wp_links, WHERE wp_links.link_category = .cat_id GROUP BY cat_name, link_name;

  6. itissue
    Member
    Posted 6 years ago #

    Nevermind about wp-feedreader. I got the date stamp to work on my feeds page. Here's the modified code:

    <?php
    require_once (ABSPATH . WPINC . '/rss-functions.php');
    $url = 'http://x.nuwen.com/feed/';
    $rss = fetch_rss( $url );
    if ( $rss ) {
    echo "<h4>" . $rss->channel['title'] . "</h4>";
    $i = 1;
    foreach ($rss->items as $item) {
    $href = $item['link'];
    $title = $item['title'];
    $pubdate = $item['pubdate'];
    $description = $item['description'];
    echo "<span style=\"font-size:16px\"><a href=\"$href\">$title</a></span><b>$pubdate</b><div style=\"padding:0 20px 0 20px\">$description</div>";
    if ($i == 1 ) break;
    $i = $i + 1;
    }}?>

    Now the only thing I really really want is for the entire entries to show up instead of just a few lines of text. Is there a variable in rss.php that I can use or anywhere?

  7. itissue
    Member
    Posted 6 years ago #

    I'm guessing I'll have to find a variable other than $description, but I don't know what to use. Here's an update on what the page looks like. Also, some entries don't have dates showing under the titles. I'm unsure why.

    http://suefeng.com/affiliates

    Thanks for your time!

  8. itissue
    Member
    Posted 6 years ago #

    Does anyone have any idea how this could work?

  9. itissue
    Member
    Posted 6 years ago #

    I'm thinking you need to use $content but that just returns the text "Arrays", so there's more to it?

  10. itissue
    Member
    Posted 6 years ago #

    I was able to figure out how to add categories and a comment link to the feed page, but I wasn't able to figure out how to insert a comma after each category. Nor was I able to show the number of comments for each entry. Here's what my new code looks like:

    <?php
    require_once (ABSPATH . WPINC . '/rss-functions.php');
    $url = 'http://x.nuwen.com/feed/';
    $rss = fetch_rss( $url );
    if ( $rss ) {
    echo "<h4>" . $rss->channel['title'] . "</h4>";
    $i = 1;
    foreach ($rss->items as $item) {
    $href = $item['link'];
    $title = $item['title'];
    $pubdate = $item['pubdate'];
    $category = $item['category'];
    $description = $item['description'];
    $comments = $item['comments'];
    echo "<span style=\"font-size:16px\"><a href=\"$href\">$title</a></span>";
    echo "<br /><strong>$pubdate</strong><br />";
    echo "<strong>Categories: </strong>$category<br />";
    echo "<div style=\"padding:0 20px 0 20px\">$description</div>";
    echo "<a href=\"$comments\">comment</a>";
    if ($i == 1 ) break;
    $i = $i + 1;
    }}?>

    Once again, I'd still like to be able to display full entries. Other problems I'd like to resolve include inserting a coma after each category word, and inserting the number of comments there are for each entry.

    Here's my page, modified:
    http://suefeng.com/affiliates

  11. itissue
    Member
    Posted 6 years ago #

    Can anyone please help me?

  12. brushwoodnursery
    Member
    Posted 6 years ago #

    At the risk of appearing to hijack this topic, I'd like to ask advice. I have loaded and played with firstRSS and like how simple and clean it is! However, if i load several references into 1 page, only the last one shows. The others show the code for the call. Can anyone tell me how to load a page with feeds from about 15 blogs? I could do it with posts, I guess, but I'd prefer them on a single page. Pages are cleaner than posts and more appropriate for this app. I'd also love a tag cloud from these 15 blogs. They will all be in my blogroll and are all on my server (if that makes any helpful difference). I'm OK working with php but no coder myself.

  13. itissue
    Member
    Posted 6 years ago #

    Still no luck on day five. I wonder why WordPress doesn't make a plugin that allows you to put all your feeds on one page, and have them list full entries, with username, categories, tags, date, title, blog title, all that useful stuff that Livejournal has. *sighs* For now, I'll have to deal with what I have. If anyone has any clue as to how to fetch entire entries in a feed, let me know. That'd be awesome.

  14. lisadragon
    Member
    Posted 6 years ago #

    hi itissue, did you use the "Page" feature to create the rss feed page? I tried it and pasting the code into the code side of "Write Page" still shows me code.. could you point me in the right direction?

  15. itissue
    Member
    Posted 6 years ago #

    Okay lisadragon, I sent you a reply in your comments.

    Here's a more specific way of viewing my problem. Maybe someone can help me then.

    I was wondering how I would call for parts in an RSS feed so I can input those parts onto a page. Here's a sample feed:

    <?xml version="1.0" encoding="UTF-8"?>
    <!-- generator="wordpress/2.2" -->
    <rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    >
    
    <channel>
    <title>My Site Title</title>
    <link>http://mysite.com</link>
    <description>Just another WordPress weblog</description>
    <pubDate>Mon, 14 Jan 2008 20:21:09 +0000</pubDate>
    <generator>http://wordpress.org/?v=2.2</generator>
    <language>en</language>
    <item>
    <title>A brief interlude</title>
    <link>http://mysite.com/2008/01/14/subject/</link>
    <comments>http://mysite.com/2008/01/14/subject/comments</comments>
    <pubDate>Mon, 14 Jan 2008 20:21:09 +0000</pubDate>
    <dc:creator>Author Name</dc:creator>
    
    <category><![CDATA[Site Update]]></category>
    
    <category><![CDATA[School]]></category>
    
    <guid isPermaLink="false">http://mysite.com/</guid>
    <description><![CDATA[Here's a short description of my post[...]]]></description>
     <content:encoded><![CDATA[Here's my full post with everything I've written in the post.]]></content:encoded>
    <wfw:commentRss>http://mysite.com/2008/01/14/subject/feed/</wfw:commentRss>
    </item>
    </channel>
    </rss>

    What I want to know is how I would call something like content:encoded, or dc:creator, and also how to call all the categories and separate each of them with a comma. I know how to call one of the categories with $category. I tried calling the content with $content, but all it did was return the word array since content is an array. If anyone could help me that would be awesome.

    Also, I changed my url to http://suefeng.com/dailies

  16. itissue
    Member
    Posted 6 years ago #

    Nevermind about that. I figured out the solution. Just use this for full content:
    $isset = $item['content']['encoded'];
    and call $isset with echo "$isset";

    To input the author's name use this:
    $author = $item['dc']['creator'];

    Now the only trick is to input all the categories listed. Since each category has it's own set of <category>category name</category> I'm not sure what to do in this case.

  17. Leiph
    Member
    Posted 6 years ago #

    I have used the Friends RSS Aggregator plug-in from http://adam.404.org/projects/friends-rss/ .

    You may see it in action at http://leiph.se/blogg-grannar where I re-publish the 100 most recent posts from bloggers in the blogg roll. [In Swedish, takes a minute or so to load.]

    It is kind of tricky to get it to work, read the tutorials at http://adam.404.org .

  18. itissue
    Member
    Posted 6 years ago #

    This plugin looks great, but it doesn't seem to list categories at all. I think I'll just stick with what I have for the time being.

  19. Adam W. Warner
    Member
    Posted 6 years ago #

    itissue,

    Would you be so kind as to post your finished coed here for our benefit?

  20. itissue
    Member
    Posted 6 years ago #

    Sure awarner20. You know, I'll do more than that. I posted a blog entry on this topic, and it gives directions on how to create your own RSS Feeds page. Here's the link:
    http://suefeng.com/2008/01/24/creating-a-rss-feeds-page/

  21. stanch
    Member
    Posted 6 years ago #

    i've written a short article about tips to publishing the rss feed posts on a separate page.

    01. example of a page contain this wp forum's recent posts:

    http://aufklarung.org/wpsupport/

    02. example of a page contain wp planet's latest posts:

    http://aufklarung.org/planet/

    anyway, you can read that article at:

    http://aufklarung.org/computer/publishing-rss-feed-posts-on-a-separate-page.mspx

    thanks,
    stanch

  22. Adam W. Warner
    Member
    Posted 6 years ago #

    Wow, very helpful, thanks to you both!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags