HOME     |     ABOUT     |     CONTACT ME     |     PRIVACY POLICY feed.png Subscribe To My Feed
Google
 

There are several plug-ins available out there for this functionality, but if you are like me who is a bit lazy :) , here’s a simple way to add other blog’s feeds to your wordpress blog.

How To Display Other Blogs Feeds to Your WordPress Blog

  1. Open the template file you want to put the other blogs’ feeds. For illustration purposes, we will going to edit the sidebar.php. Our goal is to display the latest n posts of our target blog. In my example, we will going to display the latest 3 posts.
  2. To do this, just add the following code anywhere in the sidebar.php where you want to display the feeds, customizing the highlighted text with your own preference :
  3. <h2><?php _e('LifeGuide'); ?></h2>
    <?php // Get RSS Feed(s)
    include_once(ABSPATH . WPINC . '/rss.php');
    $rss = fetch_rss('http://feeds.feedburner.com/EasyLifeGuide');
    $maxitems = 3;
    $items = array_slice($rss->items, 0, $maxitems);
    ?>
    <ul>
    <?php if (empty($items)) echo '<li>No items</li>';
    else
    foreach ( $items as $item ) : ?>
    <li><a href='<?php echo $item['link']; ?>'
    title='<?php echo $item['title']; ?>'>
    <?php echo $item['title']; ?>
    </a></li>
    <?php endforeach; ?>
    </ul>
  4. Apply some CSS customization on the appearance, the above code should look like the image below.

rss.jpg

 

Source(s): Wordpress Documentation


If you find this article informative, Bookmark this page

Digg!

Related Post(s):


Related Site(s):


Comments:
2 Comments posted on "Wordpress Tips:How To Display Other Blog’s Feeds to Your WordPress Blog"

[...] December techiegirl 11:02 amAdd comment10 Views You might want to apply this when you have several sites and you want to display your recent posts on each of your blogs. This could be beneficial since other people can see your recent posts from other blogs which they might get interested. Click here to continue reading… [...]

Powerfull Living » Blog Basics For Everyone on January 5th, 2008 at 7:54 am

[...] presents Wordpress Tips:How To Display Other Blog?s Feeds to Your WordPress Blog posted at Easy Life [...]

Post a comment
Name: 
Email: 
URL: 
Comments: