• Good morning from Canada,

    I have set up a syndicated feed list through “Rojo.com” (excellent service) and I would like to parse it to a page. I already have it working for the title and the link, however the “content/description” is formatted in an array that doesn’t seem to parse.

    Here is the code:

    <!-- RSS feed -->
    
    <?php
    if (is_page('RSS Syndication') ){
     require_once(ABSPATH . WPINC . '/rss.php');
     $rss = fetch_rss('https://www.server.com/externalfeed.rss');
     for( $i=0; $i<25; $i++ ) {
      $item=$rss->items[$i];
      $pubdate=substr($item['pubdate'], 0, 16);
      echo '
       <a href="'.$item['link'].'" title="'.$item['title'].'"><b>'.$item['title'].'</b></a>
       <i>'.$pubdate.'</i>
       <i>'.$item['content'].' content</i>
       <i>'.$item['summary'].' summary</i>
       <i>'.$item['title'].' title</i>
       <i>'.$item['content'].' content</i>
       <a href="'.$item['link'].'">more...</a>
       ';
      }
     }
    ?>
    <!-- End of feed -->

    First of all, the content outputs “Array”, and the summary is blank. Second, is there a built in parser in rss.php that I can use? I noticed the “get_rss” function in the bottom of the rss.php file.

    Thank you for your support, I am extremely new to this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter r11

    (@r11)

    <!-- RSS feed from Rojo -->
    
    <?php
     if (is_page('RSS Syndication') ){
      require_once(ABSPATH . WPINC . '/rss.php');
      wp_rss('feedurl.com/feed.rss', 10);
     }
    ?>
    
    <!-- End of feed -->

    Woop wOOp! This seems to work for me. I hope this helps someone else. now to embed a player to play podcast feeds back to back like a streaming audio channel with other peoples bandwidth! hehe. Let me know if you figure this one out.

    Thread Starter r11

    (@r11)

    argh.. I still cant seem to get other variables (description, author, etc…) to show. Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display an external feed as a page: parsing an RSS Feed’ is closed to new replies.