Rollback999

How can i display more than one twitter feed on my wordpress blog?

Asked by Rollback999 2 years ago twitter blog wordpress rss feed


Autobots
0
 
We do this by accessing the persons Twitter account RSS feed, then fetching it and embedding it on your site.

Replace the example RSS's with the ones you'd like.

<?php
    include_once(ABSPATH . WPINC . '/feed.php');
    $rss = fetch_feed('http://twitter.com/favorites/EXAMPLE.rss');
    $rss = fetch_feed('http://twitter.com/favorites/EXAMPLE.rss');
    $rss = fetch_feed('http://twitter.com/favorites/EXAMPLE.rss');
    $rss = fetch_feed('http://twitter.com/favorites/EXAMPLE.rss');
    $maxitems = $rss->get_item_quantity(3);
    $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(); ?>'>
            <?php echo $item->get_title(); ?>
        </a>
    </li>
    <?php endforeach; ?>
</ul>

by Autobots 2 years ago

Answer this question

How can i display more than one twitter feed on my wordpress blog?

0 errors found:

 
0