• Anyone have an easy little way for me to parse my rss feed from my blog to my main website, so can display the last 5 enteries?

    even a link to a sample little tutorial would be cool 🙂

    I tried cg-feed read but it doesn’t seem to work in updating my main website from my blog?

    Many Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Russ: So you want to display the RSS from one blog on another?

    Here’s what you need to see: http://codex.wordpress.org/Function_Reference/fetch_rss

    Edit: Or are you wanting to show your blog entries on another page on your same site? If that’s the case, you really don’t need to go through the RSS to do it, if it’s on the same server. How you do this really kinda depends on your setup and such.

    Otto,

    Can you direct me towards any faq’s or resources that outline how I can display blog entries on another page on the same site? Everything is on the same server. I’m assuming I just need to make a table on the page where I want the entries to show up and drop in the appropriate wordpress code but I haven’t been able to make it work. Thanks in advance!

    This “other page on the same site” — I assume that’s not another blog Page, right?

    See this article: http://codex.wordpress.org/Creating_a_Static_Front_Page

    In particular, look at the “Adding a mini-loop” section as one option.

    Thread Starter russw

    (@russw)

    thanks otto i found that but the only issue im having is displaying the number of posts it seems as if i allow 10 feeds in my syndication(wordpress) to be displayed i can not have the maggie rss reader stop the 10 from showing up, ive tried all the trick anyone know how to do it?

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Russ: Magpie parses the feed, it doesn’t display them. What displays them is that foreach loop below that. If you don’t want to display all the items, just change the loop to be a for loop or what have you.

    <?php
    require_once(ABSPATH . WPINC . '/rss-functions.php');
    $rss = fetch_rss('http://example.com/rss/feed/goes/here');
    echo '<ul>';
    for ($i = 0; $i < 5; i++) {
    if ($rss->items[i]) {
    $item = $rss->items[i]
    echo '<li><a href=\"'.$item['link'].'\" title=\"'.$item['title'].'\">'.$item['title'].'</a></li>';
    }
    }
    echo '</ul>';
    ?>

    Something sorta like that.

    Thread Starter russw

    (@russw)

    thats what im trying to do only that gives a parse error
    Parse error: parse error, expecting `’)” in httpdocs/rss/index.php on line 7
    this is line 7 for ($i = 0; $i < 5; i++) {

    Ya know… instead of re-inventing wheels here, did you look at my earlier link and the “mini-loop” example in it?

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Russ: Oops. Change that i++ to $i++. Also change the two [i]’s into [$i]’s.

    Typos, you know. 🙂

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘parsing rss feed help…’ is closed to new replies.