Support » Fixing WordPress » Problem importing an RSS feed into my WordPress blog

  • I have included the following code.

    <?php
    require_once (ABSPATH . WPINC . '/rss.php');
    wp_rss('http://alpha.libre.fm/rdf.php?fmt=rss&amp;page=/user/bananabob/recent-tracks',5);
    ?>

    And also tried

    <?php
    require_once(ABSPATH . WPINC . '/rss-functions.php');
    get_rss('http://alpha.libre.fm/rdf.php?fmt=rss&amp;page=/user/bananabob/recent-tracks', $num = 5);
    ?>

    as well as

    <?php
    require_once (ABSPATH . WPINC . '/rss-functions.php');
    // here's where to insert the feed address
    $rss = @fetch_rss('http://alpha.libre.fm/rdf.php?fmt=rss&amp;page=/user/bananabob/recent-tracks');
    if ( isset($rss->items) &amp;&amp; 0 != count($rss->items) ) {
    ?>
    <ul>
    <?php
    // here's (5) where to set the number of headlines
    $rss->items = array_slice($rss->items, 0,105);
    foreach ($rss->items as $item ) {
    ?>
    <li>
    <a href='<?php echo wp_filter_kses($item['link']); ?>'>
    <?php echo wp_specialchars($item['title']); ?>
    </a>
    </li>
    <?php } ?>
    </ul>
    <?php } ?>

    None of which display anything in my blog.
    Can someone help me solve this mystery.

Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Problem importing an RSS feed into my WordPress blog’ is closed to new replies.