• 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.

Viewing 15 replies - 1 through 15 (of 21 total)
  • Thread Starter itissue

    (@itissue)

    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.

    Thread Starter itissue

    (@itissue)

    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.

    Thread Starter itissue

    (@itissue)

    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;

    Thread Starter itissue

    (@itissue)

    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?

    Thread Starter itissue

    (@itissue)

    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!

    Thread Starter itissue

    (@itissue)

    Does anyone have any idea how this could work?

    Thread Starter itissue

    (@itissue)

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

    Thread Starter itissue

    (@itissue)

    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

    Thread Starter itissue

    (@itissue)

    Can anyone please help me?

    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.

    Thread Starter itissue

    (@itissue)

    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.

    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?

    Thread Starter itissue

    (@itissue)

    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

    Thread Starter itissue

    (@itissue)

    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.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Create an RSS feed page to view subscribed blogs’ is closed to new replies.