Support » How-To and Troubleshooting » [Resolved] Fetch feeds? Simplepie integration?

[Resolved] Fetch feeds? Simplepie integration?

  • i use to have this beautiful piece of code to fetch a rss and show it on my site

    <?php // Get RSS Feed(s)
    include_once(ABSPATH . WPINC . '/rss.php');
    $rss = fetch_rss('url to feed');
    $maxitems = 10;
    $items = array_slice($rss->items, 0, $maxitems);
    <ul class="list2">
    <?php if (empty($items)) echo '<li>No items</li>';
    foreach ( $items as $item ) : ?>
    <li><a href='<?php echo $item['link']; ?>'
    title='<?php echo $item['title']; ?>'>
    <?php echo $item['title']; ?>
    <?php endforeach; ?>

    now it is not working, and on the codex it is mentioned that the function fetch_rss has been deprecated and replaced by fetch_feed



    does anyone knows how do i use the new function?


Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Fetch feeds? Simplepie integration?’ is closed to new replies.