Title: The_excerpt_rss
Last modified: August 19, 2016

---

# The_excerpt_rss

 *  [srpd](https://wordpress.org/support/users/srpd/)
 * (@srpd)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/the_excerpt_rss/)
 * Hi, how i can use exceprt in rss?
 * i’m trying with this code :
 *     ```
       <?php // Get RSS Feed(s)
       include_once(ABSPATH . WPINC . '/feed.php');
   
       // Get a SimplePie feed object from the specified feed source.
       $rss = fetch_feed('http://my_rss');
   
       // Figure out how many total items there are, but limit it to 5.
       $maxitems = $rss->get_item_quantity(5); 
   
       // Build an array of all the items, starting with element 0 (first element).
       $rss_items = $rss->get_items(0, $maxitems); 
   
       ?>
   
       <ul>
           <?php if ($maxitems == 0) echo '<li>No items.</li>';
           else
           // Loop through each feed item and display each item as a hyperlink.
           foreach ( $rss_items as $item ) : ?>
           <li>
               <a href='<?php echo $item->get_permalink(); ?>'
               title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>
               <?php echo $item->get_title(); ?></a>
                <?php echo the_excerpt_rss( $cut, $encode_html ); ?>
           </li>
           <?php endforeach; ?>
       </ul>
       ```
   
 * but the excerpt show content from last post listed in a page e not from feed.
   
   Thanks.

Viewing 1 replies (of 1 total)

 *  Thread Starter [srpd](https://wordpress.org/support/users/srpd/)
 * (@srpd)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/the_excerpt_rss/#post-1323148)
 * anyone can help me?

Viewing 1 replies (of 1 total)

The topic ‘The_excerpt_rss’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [srpd](https://wordpress.org/support/users/srpd/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/the_excerpt_rss/#post-1323148)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
