• Resolved jdsnia

    (@jdsnia)


    Is there a plugin or script or whatever out there that can turn an rss feed from a wordpress install into links that can be embedded into a page, whether or not that page is part of the same blog as the RSS feed?

    I have several blogs up and I’d like to create a meta-page that lists a variable number of the latest entries from each blog, dynamically updated as the sites are updated without any manual intervention.

Viewing 6 replies - 1 through 6 (of 6 total)
  • WPChina

    (@wordpresschina)

    Yes, WordPress has cached RSS as part of its native package.

    You can check the Codex or use code similar to this:

    <?php
    require_once(ABSPATH . WPINC . '/rss-functions.php');
    $rss = fetch_rss('http://URL-TO-RSS-FEED-HERE');
    echo '<!--Start-->';
    for($i=0;$i<5;$i++) {
    $item=$rss->items[$i];
    echo '<p><a href="'.$item['link'].'" title="'.$item['title'].'">'.$item

    ['title'].'</a></p>';
    }
    echo '<!--End-->';
    ?>

    Thread Starter jdsnia

    (@jdsnia)

    Pretty darn cool. Thanks.

    Where can I find that in the Codex, btw? It’s not jumping out at me.

    WPChina

    (@wordpresschina)

    Also note that you only need to change the “URL-TO-RSS-FEED-HERE”.

    However for formatting, add code in the <!–START–> and <!–End–> areas. You should not change anything else.

    WPChina

    (@wordpresschina)

    Or, use CG-FeedRead, which will do (most of) the work for you. It also doesn’t depend on WP, so you can include it in any old PHP page.

    -d

    Thread Starter jdsnia

    (@jdsnia)

    How would I return the content (in this case the post excerpt included in the feed) as well, and not just the linked title?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Turn RSS feed into embedded links on a page?’ is closed to new replies.