<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Displaying Recent Posts On a Non-WordPress Page</title>
	<atom:link href="http://w-shadow.com/blog/2008/11/15/displaying-recent-posts-on-a-non-wordpress-page/feed/" rel="self" type="application/rss+xml" />
	<link>http://w-shadow.com/blog/2008/11/15/displaying-recent-posts-on-a-non-wordpress-page/</link>
	<description>Slightly Advanced Computer Stuff (and some magic)</description>
	<lastBuildDate>Sat, 07 Nov 2009 17:07:33 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: White Shadow</title>
		<link>http://w-shadow.com/blog/2008/11/15/displaying-recent-posts-on-a-non-wordpress-page/comment-page-1/#comment-31763</link>
		<dc:creator>White Shadow</dc:creator>
		<pubDate>Wed, 14 Oct 2009 11:15:22 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=504#comment-31763</guid>
		<description>Sure, send it in. My email is whiteshadow[at]w-shadow[dot]com</description>
		<content:encoded><![CDATA[<p>Sure, send it in. My email is whiteshadow[at]w-shadow[dot]com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://w-shadow.com/blog/2008/11/15/displaying-recent-posts-on-a-non-wordpress-page/comment-page-1/#comment-31759</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Tue, 13 Oct 2009 20:53:56 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=504#comment-31759</guid>
		<description>Oops, code got truncated.  I&#039;ll try to send to you directly if you don&#039;t mind....</description>
		<content:encoded><![CDATA[<p>Oops, code got truncated.  I&#8217;ll try to send to you directly if you don&#8217;t mind&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://w-shadow.com/blog/2008/11/15/displaying-recent-posts-on-a-non-wordpress-page/comment-page-1/#comment-31758</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Tue, 13 Oct 2009 20:53:08 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=504#comment-31758</guid>
		<description>The html for the odd text looks like:  &quot;Ben Pleasants &#226;€“ Four Poems&quot;

So it&#039;s not getting interpreted correctly...  I&#039;m using a simplified version of your php above:


error())
	echo &#039;Error : &#039;,$feed-&gt;error();
 
//Output up to $max_items posts 
foreach ($feed-&gt;get_items(0, $max_items) as $item): ?&gt;
 	
		&lt;a href=&quot;get_permalink(); ?&gt;&quot;&gt;get_title()); ?&gt;&lt;/a&gt;
		
	
</description>
		<content:encoded><![CDATA[<p>The html for the odd text looks like:  &#8220;Ben Pleasants &acirc;€“ Four Poems&#8221;</p>
<p>So it&#8217;s not getting interpreted correctly&#8230;  I&#8217;m using a simplified version of your php above:</p>
<p>error())<br />
	echo &#8216;Error : &#8216;,$feed-&gt;error();</p>
<p>//Output up to $max_items posts<br />
foreach ($feed-&gt;get_items(0, $max_items) as $item): ?&gt;</p>
<p>		&lt;a href=&quot;get_permalink(); ?&gt;&#8221;&gt;get_title()); ?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: White Shadow</title>
		<link>http://w-shadow.com/blog/2008/11/15/displaying-recent-posts-on-a-non-wordpress-page/comment-page-1/#comment-31753</link>
		<dc:creator>White Shadow</dc:creator>
		<pubDate>Tue, 13 Oct 2009 17:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=504#comment-31753</guid>
		<description>Check the HTML source of your page. I&#039;ve had a similar problem where the symbols were actually correct in the HTML but my browser had decided to use the wrong encoding/character set when displaying that page.

That&#039;s the only remaining easy-to-check thing I can suggest without having seen your actual script.</description>
		<content:encoded><![CDATA[<p>Check the HTML source of your page. I&#8217;ve had a similar problem where the symbols were actually correct in the HTML but my browser had decided to use the wrong encoding/character set when displaying that page.</p>
<p>That&#8217;s the only remaining easy-to-check thing I can suggest without having seen your actual script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://w-shadow.com/blog/2008/11/15/displaying-recent-posts-on-a-non-wordpress-page/comment-page-1/#comment-31752</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Tue, 13 Oct 2009 16:53:26 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=504#comment-31752</guid>
		<description>Checked the documentation and tried htmlentities().  No luck.  I also switched to utf-8 encoding.  Again, no luck though.  The feed seems to be ok.  When I run it through the SimplePie demo (on their site) it shows up just fine.  It only shows up &quot;wrong&quot; on my site.

Any further ideas?</description>
		<content:encoded><![CDATA[<p>Checked the documentation and tried htmlentities().  No luck.  I also switched to utf-8 encoding.  Again, no luck though.  The feed seems to be ok.  When I run it through the SimplePie demo (on their site) it shows up just fine.  It only shows up &#8220;wrong&#8221; on my site.</p>
<p>Any further ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: White Shadow</title>
		<link>http://w-shadow.com/blog/2008/11/15/displaying-recent-posts-on-a-non-wordpress-page/comment-page-1/#comment-31707</link>
		<dc:creator>White Shadow</dc:creator>
		<pubDate>Fri, 09 Oct 2009 18:31:29 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=504#comment-31707</guid>
		<description>It&#039;s either an encoding problem (in which case the &lt;a href=&quot;http://simplepie.org/wiki/&quot; rel=&quot;nofollow&quot;&gt;SimplePie documentation&lt;/a&gt; might enlighten you), or an opportunity for applying htmlentities() with extreme prejudice. Personally, pre-processing the title with htmlentities() would be the first thing I would try.</description>
		<content:encoded><![CDATA[<p>It&#8217;s either an encoding problem (in which case the <a href="http://simplepie.org/wiki/" rel="nofollow">SimplePie documentation</a> might enlighten you), or an opportunity for applying htmlentities() with extreme prejudice. Personally, pre-processing the title with htmlentities() would be the first thing I would try.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://w-shadow.com/blog/2008/11/15/displaying-recent-posts-on-a-non-wordpress-page/comment-page-1/#comment-31697</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Fri, 09 Oct 2009 01:03:44 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=504#comment-31697</guid>
		<description>Thanks. Good tip.  

I&#039;m having one issue though. If the feed pulls in a blog post where the original title contains a &quot;-&quot; symbol (i.e. HTML = &#8211;), the resulting code on my site for that - is &#039; â€“ &#039;.

So instead of the title appearing as:
&quot;Ben Pleasants - Four Poems&quot;

I get:
&quot;Ben Pleasants â€“ Four Poems&quot;

Any idea on how to resolve that?

Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks. Good tip.  </p>
<p>I&#8217;m having one issue though. If the feed pulls in a blog post where the original title contains a &#8220;-&#8221; symbol (i.e. HTML = &ndash;), the resulting code on my site for that &#8211; is &#8216; â€“ &#8216;.</p>
<p>So instead of the title appearing as:<br />
&#8220;Ben Pleasants &#8211; Four Poems&#8221;</p>
<p>I get:<br />
&#8220;Ben Pleasants â€“ Four Poems&#8221;</p>
<p>Any idea on how to resolve that?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: White Shadow</title>
		<link>http://w-shadow.com/blog/2008/11/15/displaying-recent-posts-on-a-non-wordpress-page/comment-page-1/#comment-30528</link>
		<dc:creator>White Shadow</dc:creator>
		<pubDate>Fri, 12 Jun 2009 10:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=504#comment-30528</guid>
		<description>If an RSS item has a single category, you can display it like this : 
&lt;pre lang=&#039;php&#039;&gt;
if ($category= $item-&gt;get_category())
{
	echo $category-&gt;get_label();
}&lt;/pre&gt;

As for the rest of your question, how (and if) it can be done depends entirely on your feed structure and blog configuration. For example, you can&#039;t really get the category and profile links from a typical FeedBurner feed without some ingenious hacking.</description>
		<content:encoded><![CDATA[<p>If an RSS item has a single category, you can display it like this :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$category</span><span style="color: #339933;">=</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_category</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$category</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_label</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>As for the rest of your question, how (and if) it can be done depends entirely on your feed structure and blog configuration. For example, you can&#8217;t really get the category and profile links from a typical FeedBurner feed without some ingenious hacking.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay</title>
		<link>http://w-shadow.com/blog/2008/11/15/displaying-recent-posts-on-a-non-wordpress-page/comment-page-1/#comment-30506</link>
		<dc:creator>Jay</dc:creator>
		<pubDate>Thu, 11 Jun 2009 07:44:28 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=504#comment-30506</guid>
		<description>How to edit the code to show a link to the writer profile and a link to the category of the post?

Example: &quot;Posted by USER on Wed, Jun 10th 2009, 18:01 to CATEGORY&quot;</description>
		<content:encoded><![CDATA[<p>How to edit the code to show a link to the writer profile and a link to the category of the post?</p>
<p>Example: &#8220;Posted by USER on Wed, Jun 10th 2009, 18:01 to CATEGORY&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: White Shadow</title>
		<link>http://w-shadow.com/blog/2008/11/15/displaying-recent-posts-on-a-non-wordpress-page/comment-page-1/#comment-20699</link>
		<dc:creator>White Shadow</dc:creator>
		<pubDate>Fri, 13 Mar 2009 15:39:42 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=504#comment-20699</guid>
		<description>You&#039;re welcome :)</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome <img src='http://w-shadow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
