<?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: Write Your Own Related Posts Plugin</title>
	<atom:link href="http://curtishenson.com/write-your-own-related-posts-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://curtishenson.com/version7/write-your-own-related-posts-plugin/</link>
	<description>Freelance Web Designer and Wordpress Guru</description>
	<lastBuildDate>Mon, 27 Sep 2010 12:59:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Sarah</title>
		<link>http://curtishenson.com/version7/write-your-own-related-posts-plugin/comment-page-1/#comment-1826</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Mon, 29 Dec 2008 09:32:17 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=108#comment-1826</guid>
		<description>Thanks for replying so soon! Will do and let you know</description>
		<content:encoded><![CDATA[<p>Thanks for replying so soon! Will do and let you know</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtis Henson</title>
		<link>http://curtishenson.com/version7/write-your-own-related-posts-plugin/comment-page-1/#comment-1824</link>
		<dc:creator>Curtis Henson</dc:creator>
		<pubDate>Mon, 29 Dec 2008 02:16:59 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=108#comment-1824</guid>
		<description>Sarah,

Can&#039;t be sure whats going on with out seeing the code, but look for anything that might be causing a conflict between the two functions, like something named the same.</description>
		<content:encoded><![CDATA[<p>Sarah,</p>
<p>Can&#8217;t be sure whats going on with out seeing the code, but look for anything that might be causing a conflict between the two functions, like something named the same.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarah</title>
		<link>http://curtishenson.com/version7/write-your-own-related-posts-plugin/comment-page-1/#comment-1823</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Mon, 29 Dec 2008 00:12:31 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=108#comment-1823</guid>
		<description>Thanks you so much for this great tutorial!
I&#039;m trying to have both (same) category related posts and tag related posts so I used the code from your previous tut bellow the code from this tut but whenever I call both widgets the one makes the other dissapear! Obviously this is not the way to do it but how can I have both types of related posts together on the same page? Please help!</description>
		<content:encoded><![CDATA[<p>Thanks you so much for this great tutorial!<br />
I&#8217;m trying to have both (same) category related posts and tag related posts so I used the code from your previous tut bellow the code from this tut but whenever I call both widgets the one makes the other dissapear! Obviously this is not the way to do it but how can I have both types of related posts together on the same page? Please help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicole</title>
		<link>http://curtishenson.com/version7/write-your-own-related-posts-plugin/comment-page-1/#comment-1486</link>
		<dc:creator>Nicole</dc:creator>
		<pubDate>Fri, 17 Oct 2008 02:39:08 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=108#comment-1486</guid>
		<description>Thank you! That was perfect. Here’s what I ended up using to produce something like: “News: Title of Related News Story”
ID); $cat_name = get_cat_name($category_list[0]); ?&gt;
		&lt;a href=&quot;ID); ?&gt;&quot;&gt;       
   		post_title ?&gt;&lt;/a&gt; </description>
		<content:encoded><![CDATA[<p>Thank you! That was perfect. Here’s what I ended up using to produce something like: “News: Title of Related News Story”<br />
ID); $cat_name = get_cat_name($category_list[0]); ?&gt;<br />
		&lt;a href=&#8221;ID); ?&gt;&#8221;&gt;<br />
   		post_title ?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtis Henson</title>
		<link>http://curtishenson.com/version7/write-your-own-related-posts-plugin/comment-page-1/#comment-1484</link>
		<dc:creator>Curtis Henson</dc:creator>
		<pubDate>Fri, 17 Oct 2008 01:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=108#comment-1484</guid>
		<description>Nicole,

This code is long and ungraceful but it will get you an array of category IDs which you can then get the name of.

&lt;code&gt;$foo = wp_get_post_categories($related_post-&gt;ID); 
echo print_r($foo);
$bar = get_cat_name($foo[0]); 
echo $bar;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Nicole,</p>
<p>This code is long and ungraceful but it will get you an array of category IDs which you can then get the name of.</p>
<p><code>$foo = wp_get_post_categories($related_post->ID);<br />
echo print_r($foo);<br />
$bar = get_cat_name($foo[0]);<br />
echo $bar;</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicole</title>
		<link>http://curtishenson.com/version7/write-your-own-related-posts-plugin/comment-page-1/#comment-1483</link>
		<dc:creator>Nicole</dc:creator>
		<pubDate>Thu, 16 Oct 2008 23:05:06 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=108#comment-1483</guid>
		<description>It appears that if I use the the_category() within the foreach loop call it will return the category of the post I&#039;m viewing, not of the related post. Other ideas?</description>
		<content:encoded><![CDATA[<p>It appears that if I use the the_category() within the foreach loop call it will return the category of the post I&#8217;m viewing, not of the related post. Other ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicole</title>
		<link>http://curtishenson.com/version7/write-your-own-related-posts-plugin/comment-page-1/#comment-1482</link>
		<dc:creator>Nicole</dc:creator>
		<pubDate>Thu, 16 Oct 2008 22:51:11 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=108#comment-1482</guid>
		<description>Unfortunately that&#039;s the sort of thing I&#039;ve tried and had no luck with. If I put that in exactly, I see nothing (if I make it a list item, it displays a bullet with nothing next to it). The only way I get it to output anything is to echo $foo which gives me &quot;array&quot;. That&#039;s why I&#039;m thinking I need to grab the value directly out of the db somehow. This is definitely going to haunt me...</description>
		<content:encoded><![CDATA[<p>Unfortunately that&#8217;s the sort of thing I&#8217;ve tried and had no luck with. If I put that in exactly, I see nothing (if I make it a list item, it displays a bullet with nothing next to it). The only way I get it to output anything is to echo $foo which gives me &#8220;array&#8221;. That&#8217;s why I&#8217;m thinking I need to grab the value directly out of the db somehow. This is definitely going to haunt me&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtis Henson</title>
		<link>http://curtishenson.com/version7/write-your-own-related-posts-plugin/comment-page-1/#comment-1481</link>
		<dc:creator>Curtis Henson</dc:creator>
		<pubDate>Thu, 16 Oct 2008 22:12:24 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=108#comment-1481</guid>
		<description>Nicole,

Maybe something like this will work for you. Use it inside the foreach loop.

&lt;code&gt;$foo = get_categories(); echo $foo[0]-&gt;cat_name;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Nicole,</p>
<p>Maybe something like this will work for you. Use it inside the foreach loop.</p>
<p><code>$foo = get_categories(); echo $foo[0]->cat_name;</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicole</title>
		<link>http://curtishenson.com/version7/write-your-own-related-posts-plugin/comment-page-1/#comment-1480</link>
		<dc:creator>Nicole</dc:creator>
		<pubDate>Thu, 16 Oct 2008 21:30:53 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=108#comment-1480</guid>
		<description>Curtis - I&#039;m trying to figure out how to also list the category of the related post, but apparently my knowledge of the db structure isn&#039;t good enough. Can you point me in the right direction?</description>
		<content:encoded><![CDATA[<p>Curtis &#8211; I&#8217;m trying to figure out how to also list the category of the related post, but apparently my knowledge of the db structure isn&#8217;t good enough. Can you point me in the right direction?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexandre</title>
		<link>http://curtishenson.com/version7/write-your-own-related-posts-plugin/comment-page-1/#comment-1191</link>
		<dc:creator>Alexandre</dc:creator>
		<pubDate>Thu, 17 Jul 2008 19:36:43 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=108#comment-1191</guid>
		<description>Great work!
Very useful

Thank you.</description>
		<content:encoded><![CDATA[<p>Great work!<br />
Very useful</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

