• Hey folks,

    I’ve been looking around the web and I can’t seem to find something specific to what I want.

    By default, my site has truncated RSS feeds. But I want certain ones to not be truncated–as in y category specific RSS feeds. How do I do that?

Viewing 1 replies (of 1 total)
  • howdy chris

    thanks for coming up with this idea.`

    <?php // Get RSS Feed(s)
    include_once(ABSPATH . WPINC . ‘/feed.php’);

    $rss = fetch_feed(‘http://examplesite.com/rss&#8217;);
    if (!is_wp_error( $rss ) ) :

    $maxitems = $rss->get_item_quantity(5);

    $rss_items = $rss->get_items(0, $maxitems);
    endif;
    ?>

    <ul>
    <?php if ($maxitems == 0) echo ‘<li>No items.</li>’;
    else

    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>
    </li>
    <?php endforeach; ?>
    </ul>`

    see more:
    http://wordpress.stackexchange.com/questions/245968/truncating-imported-rss-feeds

Viewing 1 replies (of 1 total)

The topic ‘Only certain RSS Feeds Full’ is closed to new replies.