Title: Fetch RSS
Last modified: August 19, 2016

---

# Fetch RSS

 *  [albertkidd](https://wordpress.org/support/users/albertkidd/)
 * (@albertkidd)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/fetch-rss-1/)
 * [http://codex.wordpress.org/Function_Reference/fetch_rss](http://codex.wordpress.org/Function_Reference/fetch_rss)
 * I am using this to get the rss feeds (rss2) I need to output the
 * date
    title snipit of the entry (100 characters) link
 * this is what i have so far but cannot get the date or the content, can someone
   help?
 *     ```
       <h2><?php _e('Headlines from AP News'); ?></h2>
       <?php // Get RSS Feed(s)
       include_once(ABSPATH . WPINC . '/rss.php');
       $rss = fetch_rss('http://myurl.co.uk/index1.php?feed=rss2');
       $maxitems = 5;
       $items = array_slice($rss->items, 0, $maxitems);
       ?>
   
       <ul>
       <?php if (empty($items)) echo '
       <li>No items</li>
       ';
       else
       foreach ( $items as $item ) : ?>
   
       <li><a>'
       title='<?php echo $item['title']; ?>'>
       <?php echo $item['title']; ?></a><?php echo $item['content']; ?>
   
       </li>
       <?php endforeach; ?>
       </ul>
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [davexw](https://wordpress.org/support/users/davexw/)
 * (@davexw)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/fetch-rss-1/#post-837333)
 * Sorry to hijack this thread, but I have a partial solution. The following will
   add your content to the feed.
 * `<?php echo $item['description']; ?>`
 * **Can someone help us add the date? I’ve already tried the following to no avail:**
 * `<?php echo $item['pubDate']; ?>`
 *  [whoisvaibhav](https://wordpress.org/support/users/whoisvaibhav/)
 * (@whoisvaibhav)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/fetch-rss-1/#post-837441)
 * instead of pubDate use pubdate

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Fetch RSS’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [whoisvaibhav](https://wordpress.org/support/users/whoisvaibhav/)
 * Last activity: [16 years, 11 months ago](https://wordpress.org/support/topic/fetch-rss-1/#post-837441)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
