I use Wordpress' own rss.php to pull in the last 10 items from an external RSS feed. Wordpress automatically adds campaign info to the link like this:
http://domainname.com/postname?utm_source=rss&utm_medium=rss&utm_campaign=postname
Because of the ampersands, the page doesn't validate. Was wondering if I can add anything to the code below to solve it.
<!-- if Blog Feed exists-->
<?php $blogfeed = get_post_meta($post->ID, 'blog_feed', true);
if($blogfeed) : ?>
<div id="slideshow">
<ul>
<?php
include_once(ABSPATH.WPINC.'/rss.php'); // path to include script
$feed = fetch_rss($blogfeed); // specify feed url
$items = array_slice($feed->items, 0, 10); // specify first and last item
?>
<?php if (!empty($items)) : ?>
<?php foreach ($items as $item) : ?>
<li class="feed-item">
<h4><a href="<?php echo $item['link']; ?>" target="_blank"><?php echo $item['title']; ?></a></h4>
<p><?php echo $item['atom_content']; ?></p>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div><!-- / #slideshow -->
<?php else : ?>
<?php endif; ?>