<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Add latest RSS items to Wordpress Post</title>
	<link>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/</link>
	<description>Tutorials from the Front line of Web Development</description>
	<pubDate>Fri, 05 Sep 2008 18:51:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: &#160; Table Of Contents Of Wordpress Tutorials, Helps, Tips and Tricks&#160;by&#160;aComment.net</title>
		<link>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-753</link>
		<dc:creator>&#160; Table Of Contents Of Wordpress Tutorials, Helps, Tips and Tricks&#160;by&#160;aComment.net</dc:creator>
		<pubDate>Mon, 14 Jul 2008 17:36:39 +0000</pubDate>
		<guid>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-753</guid>
		<description>[...]  Add latest RSS items to Wordpress Post [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;]  Add latest RSS items to Wordpress Post [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raj</title>
		<link>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-377</link>
		<dc:creator>raj</dc:creator>
		<pubDate>Wed, 14 May 2008 16:49:00 +0000</pubDate>
		<guid>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-377</guid>
		<description>WordPress does have a built-in RSS parser: fetch_rss(). At least in the V2.x series</description>
		<content:encoded><![CDATA[<p>WordPress does have a built-in RSS parser: fetch_rss(). At least in the V2.x series</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil</title>
		<link>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-26</link>
		<dc:creator>Phil</dc:creator>
		<pubDate>Thu, 13 Mar 2008 15:55:59 +0000</pubDate>
		<guid>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-26</guid>
		<description>Finding your site was an accident thanks to google, but I like it</description>
		<content:encoded><![CDATA[<p>Finding your site was an accident thanks to google, but I like it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-22</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Wed, 12 Mar 2008 23:54:48 +0000</pubDate>
		<guid>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-22</guid>
		<description>This tutorial is great, thanks a lot, i searched for something like this a while. Very plain and simple.
I will use this on my blog directory.</description>
		<content:encoded><![CDATA[<p>This tutorial is great, thanks a lot, i searched for something like this a while. Very plain and simple.<br />
I will use this on my blog directory.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emily M.</title>
		<link>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-20</link>
		<dc:creator>Emily M.</dc:creator>
		<pubDate>Wed, 12 Mar 2008 20:42:09 +0000</pubDate>
		<guid>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-20</guid>
		<description>Hello, Nice writeup about Add latest RSS items to Wordpress Post. I would have to agree with you on this one. I am going to look more into . This Wednesday I have time.</description>
		<content:encoded><![CDATA[<p>Hello, Nice writeup about Add latest RSS items to Wordpress Post. I would have to agree with you on this one. I am going to look more into . This Wednesday I have time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Parman</title>
		<link>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-7</link>
		<dc:creator>Ryan Parman</dc:creator>
		<pubDate>Tue, 04 Mar 2008 04:41:59 +0000</pubDate>
		<guid>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-7</guid>
		<description>The only problem with using SimpleXML is that RSS is only occasionally ever actually valid XML. If you're parsing clean, perfect XML (such as from a web service API), SimpleXML is great. If you want to parse all of the imperfections of HTML repackaged in XML (aka RSS or Atom), you need something that is properly tuned for such a task. ;)</description>
		<content:encoded><![CDATA[<p>The only problem with using SimpleXML is that RSS is only occasionally ever actually valid XML. If you&#8217;re parsing clean, perfect XML (such as from a web service API), SimpleXML is great. If you want to parse all of the imperfections of HTML repackaged in XML (aka RSS or Atom), you need something that is properly tuned for such a task. <img src='http://www.cuttingedgetutorials.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronald</title>
		<link>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-6</link>
		<dc:creator>Ronald</dc:creator>
		<pubDate>Sat, 01 Mar 2008 15:11:10 +0000</pubDate>
		<guid>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-6</guid>
		<description>still a mess, sorry!</description>
		<content:encoded><![CDATA[<p>still a mess, sorry!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronald</title>
		<link>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-5</link>
		<dc:creator>Ronald</dc:creator>
		<pubDate>Sat, 01 Mar 2008 15:03:58 +0000</pubDate>
		<guid>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-5</guid>
		<description>mmm, code seems to be messed up, just tryig to use tags. Moderator, if it doesn't work,  feel free to remove my reply.

&lt;code&gt;
&#60;?php
$values = get_post_custom_values("rss_url"); 
$rss_url = $values[0];
if ($rss_url) {
	//  Load the XML file into a Simple XML object
	$feed = simplexml_load_file($rss_url);
	if ($feed) {
	 	echo "Feeds";
		echo "";
		//  Iterate through the list and create the unordered list
		foreach ($feed-&#62;channel-&#62;item as $item) {
			echo '&lt;a&gt;link .'" title="' . htmlspecialchars(strip_tags($item-&#62;description)) . ' "&#62;' . $item-&#62;title . '&lt;/a&gt;';
		}
		echo "";
	}
}
?&#62;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>mmm, code seems to be messed up, just tryig to use tags. Moderator, if it doesn&#8217;t work,  feel free to remove my reply.</p>
<p><code><br />
&lt;?php<br />
$values = get_post_custom_values("rss_url");<br />
$rss_url = $values[0];<br />
if ($rss_url) {<br />
	//  Load the XML file into a Simple XML object<br />
	$feed = simplexml_load_file($rss_url);<br />
	if ($feed) {<br />
	 	echo "Feeds";<br />
		echo "";<br />
		//  Iterate through the list and create the unordered list<br />
		foreach ($feed-&gt;channel-&gt;item as $item) {<br />
			echo '<a>link .&#8217;&#8221; title=&#8221;&#8216; . htmlspecialchars(strip_tags($item-&gt;description)) . &#8216; &#8220;&gt;&#8217; . $item-&gt;title . &#8216;</a>&#8216;;<br />
		}<br />
		echo &#8220;&#8221;;<br />
	}<br />
}<br />
?&gt;<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronald</title>
		<link>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-4</link>
		<dc:creator>Ronald</dc:creator>
		<pubDate>Sat, 01 Mar 2008 15:00:11 +0000</pubDate>
		<guid>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-4</guid>
		<description>Hi, since PHP5 there is no need to use and external library. So another approach could be to use the PHP function simplexml_load_file.

Using your example:

&#60;?php
// Get the first value for rss_url
$values = get_post_custom_values("rss_url"); 
$rss_url = $values[0];

if ($rss_url) {
	//  Load the XML file into a Simple XML object
	$feed = simplexml_load_file($rss_url);
	if ($feed) {
	 	echo "Recent Posts From This Blog";
		echo "";
		//  Iterate through the list and create the unordered list
		foreach ($feed-&#62;channel-&#62;item as $item) {
			echo '&lt;a&gt;link .'" title="' . htmlspecialchars(strip_tags($item-&#62;description)) . ' "&#62;' . $item-&#62;title . '&lt;/a&gt;';
		}
		echo "";
	}
}
?&#62;

Bonus feature here :-): Using the title attribute on the anchor tag (a href=) means that on hovering the link a preview of the feed's description is displayed (the socalled "tooltip").

Ronald</description>
		<content:encoded><![CDATA[<p>Hi, since PHP5 there is no need to use and external library. So another approach could be to use the PHP function simplexml_load_file.</p>
<p>Using your example:</p>
<p>&lt;?php<br />
// Get the first value for rss_url<br />
$values = get_post_custom_values(&#8221;rss_url&#8221;);<br />
$rss_url = $values[0];</p>
<p>if ($rss_url) {<br />
	//  Load the XML file into a Simple XML object<br />
	$feed = simplexml_load_file($rss_url);<br />
	if ($feed) {<br />
	 	echo &#8220;Recent Posts From This Blog&#8221;;<br />
		echo &#8220;&#8221;;<br />
		//  Iterate through the list and create the unordered list<br />
		foreach ($feed-&gt;channel-&gt;item as $item) {<br />
			echo &#8216;<a>link .&#8217;&#8221; title=&#8221;&#8216; . htmlspecialchars(strip_tags($item-&gt;description)) . &#8216; &#8220;&gt;&#8217; . $item-&gt;title . &#8216;</a>&#8216;;<br />
		}<br />
		echo &#8220;&#8221;;<br />
	}<br />
}<br />
?&gt;</p>
<p>Bonus feature here :-): Using the title attribute on the anchor tag (a href=) means that on hovering the link a preview of the feed&#8217;s description is displayed (the socalled &#8220;tooltip&#8221;).</p>
<p>Ronald</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-3</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 19 Feb 2008 19:42:47 +0000</pubDate>
		<guid>http://www.cuttingedgetutorials.com/2008/02/18/add-latest-rss-item-to-wordpress-post/#comment-3</guid>
		<description>@Jenny:  No, I don't think so.  There are a number of plugins that let you add RSS feeds to the sidebar and such, and to create posts like I've done on this site.  They all use external libraries (SimplePie, and Magpie are 2 popular ones).

I take that back, a modified version of Magpie is included with Wordpress, but I find that SimplePie is much easier to work with and more robust at parsing the RSS feeds.</description>
		<content:encoded><![CDATA[<p>@Jenny:  No, I don&#8217;t think so.  There are a number of plugins that let you add RSS feeds to the sidebar and such, and to create posts like I&#8217;ve done on this site.  They all use external libraries (SimplePie, and Magpie are 2 popular ones).</p>
<p>I take that back, a modified version of Magpie is included with Wordpress, but I find that SimplePie is much easier to work with and more robust at parsing the RSS feeds.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
