• I use the following code to spit out the most 10 most recent posts from a blog listed in the directory I run.

    For some reason the code works in one theme, but not the current theme which I like better.

    $rss = fetch_rss($url);
    $url = get_post_meta($post->ID, “RSS URL”, true);
    if (is_array($rss->items)) {
    $items = array_slice($rss->items, 0, 10);
    echo ‘

      ‘;
      foreach ($items as $item)
      {
      $desc = htmlspecialchars(substr(strip_tags($item[‘description’]),0,300));
      echo ‘

    • ‘ . $item[‘title’] . ‘
    • ‘;
      }
      echo ‘

    ‘;
    } else { echo ‘<p>No feeds yet. Come back soon!</p>’; }

    gives me the error:
    Fatal error: Call to undefined function: fetch_rss() in /www.bestgreenblogs.com/wp-content/themes/just-lucid/single.php on line 69

    It works in my other theme, but why would it not work in the current one I use?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Fetch rss issues…’ is closed to new replies.