Forums

[resolved] RSS Excerpt (2 posts)

  1. Jabbok
    Member
    Posted 3 years ago #

    I'm using the following code to pull the HEADLINES from another blog. I would like to include and excerpt of the blog post as well. Can anyone tell me what to add to the code to get this done?

    <?php
    require_once (ABSPATH . WPINC . '/rss.php');
    // insert the feed URL here
    $rss = @fetch_rss('http://feeds.feedburner.com/blogspot/LTnB');
    if ( isset($rss->items) && 0 != count($rss->items) ) {
    ?>
    <?php
     // set the number of items from the feed to display (10)
    $rss->items = array_slice($rss->items, 0, 6);
    foreach ($rss->items as $item ) {
    ?>
    <a href='<?php echo wp_filter_kses($item['link']); ?>'>
    <?php echo wp_specialchars($item['title']); ?>
    </a>
    <?php } ?>
    <?php } ?>
  2. Jabbok
    Member
    Posted 3 years ago #

    I searched for DAYS for a solution to my need and finally found one in the first place I should have looked.

    Feedburner has everything you need to add 50,100 or 150 word excerpts to your RSS feeds. It was exactly what I needed.

    WordPress has become SOOOOOO large that it has become extremely difficult to find what you're looking for with a simple google search.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.