Title: Fetch rss issues&#8230;
Last modified: August 19, 2016

---

# Fetch rss issues…

 *  [timothyb](https://wordpress.org/support/users/timothyb/)
 * (@timothyb)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/fetch-rss-issues/)
 * 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’] . ‘](https://wordpress.org/support/topic/fetch-rss-issues/&apos;. $item[&apos;link&apos;] .&apos;?output_format=md)
    - ‘;
       } 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)

 *  Thread Starter [timothyb](https://wordpress.org/support/users/timothyb/)
 * (@timothyb)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/fetch-rss-issues/#post-780020)
 * Does there need to be a “if(function_exists” inserted into the line?

Viewing 1 replies (of 1 total)

The topic ‘Fetch rss issues…’ is closed to new replies.

## Tags

 * [RSS](https://wordpress.org/support/topic-tag/rss/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [timothyb](https://wordpress.org/support/users/timothyb/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/fetch-rss-issues/#post-780020)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
