Add Latest Perfume Posts To Your Website

Apparently this has ability has been built into wordpress for quite some time but a friend of mine recently pointed out 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 perfume post to my sidebar I added the following to my theme…

<h3>Latest Perfume Posts</h3>
<?php
// Get RSS Feed(s)
include_once(ABSPATH . WPINC . ‘/rss.php’
);
$rss = fetch_rss(http://www.perfumebloggers.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>

Blog Traffic Exchange Related Websites
  • phpmyadminDisable Wordpress plugins through phpMyAdmin I recently encountered some problem with my Wordpress blog after updating it to version 2.8. Due to this update, the plugins also needed to be updated. So, while doing that, there was some problem and my blog wasn't ready to open. So, I thought of disabling all the plugins and......
  • I Sold Some Books at Half Price Books This weekend my wife and I were doing a little cleaning and decided to clear out some books, movies, etc. that were basically just clutter. We like going to Half Price Books because you can find some great deals there on used books, movies, and other forms of media (check......


Categories:

tools



0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment

Email Updates