Apparently this has ability has been built into wordpress for quite some time but a friend of mine recently pointed up that it can be done (pfblogs popular posts added to sidebar.) Here is the wordpress codex for this feature: http://codex.wordpress.org/Function_Reference/fetch_rss.
To add the latest weight loss health and fitness posts to my sidebar I added the following to my theme…
<h3>Latest Weight Loss and Fitness Posts</h3>
<?php // Get RSS Feed(s)
include_once(ABSPATH . WPINC . ‘/rss.php’);
$rss = fetch_rss(‘http://www.fitbloggers.com/feed’);
$maxitems = 10;
$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> (<?php echo $item[‘dc’][‘creator’]; ?>)</li>
<?php endforeach; ?>
</ul>
Originally posted 2008-05-11 13:10:17. Republished by Old Post Promoter
Related Posts- Sunday Roundup - Lose that Weight! In this edition of the Sunday roundup I've pulled several posts from blogs on a myriad of subjects but mostly I found posts on the subject of losing weight. Hopefully they will help you on your way to a healthier and better life. Have a happy and healthy weekend!......
- Sunday Roundup - Fats, Weight, and Stigmas Welcome to another edition of the Sunday roundup. This issue has a lot in regards to weight-loss, weight-gain and fat. Enjoy! The Fitness Health Network presents: Fat Man Unleashed asks Rise in Obesity Related to Quick Weight Loss Diets? Lazy Man and Health talks about Chewing the Fat. Speaking of......
- Are You Skinny Fat? (ie: if thin people don't exercise they aren't healthy) Do you know what it means to be skinny fat? Just because you are not obviously visually overweight, that does not mean that you are healthy by any means. There are many people that appear to be thin and healthy, but......
- Carnival of Weight Loss Lose weight great! Gain weight and commiserate! The Carnival of Weight Loss is published weekly. Submission deadline is Friday 6pm pst (GMT -8). Carnival Participation Guidelines: Articles should focus on weight loss, diet, health, fitness, sports, or outdoors. In short anything involving a healthy lifestyle. One submission per week per......
- Wickedly Spooky Halloween Roundup Happy Sunday to all my readers! Today's all about the roundup. As usual we have the Fitness Health Network of which I am a part of so go ahead and browse through the posts. You'll find they have a lot of great things to say. A little further down are......
Time the change your life? No longer content to live a sedentary lifestyle and revel in couch potatoism? Click here to download the 31 page the 100% FREE eBook "How to Lose Weight and Maintain a Healthy Lifestyle."
Categories:



































0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment