<?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: Challenge: how to display only authors who have written in a specific category?</title>
	<atom:link href="http://wpgarage.com/shorties/authors-in-categories/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpgarage.com/shorties/authors-in-categories/</link>
	<description>wordpress tricks, hacks, and tips</description>
	<lastBuildDate>Wed, 17 Mar 2010 11:29:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ales</title>
		<link>http://wpgarage.com/shorties/authors-in-categories/comment-page-1/#comment-60076</link>
		<dc:creator>Ales</dc:creator>
		<pubDate>Tue, 23 Jun 2009 09:50:36 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/shorties/authors-in-categories/#comment-60076</guid>
		<description>This might be useful to someone.
I&#039;ve taken the code above and turned it into this...
This works for me and does exactly what is described above...
&lt;?php 
 $author_array = array();
 $cat_posts = get_posts(&#039;numberposts=-1&amp;category=48&amp;orderby=author&amp;order=ASC&#039;);

 foreach ($cat_posts as $cat_post) :
 if (!in_array($cat_post-&gt;post_author,$author_array)) { 
 $author_array[] = $cat_post-&gt;post_author;
 }
 endforeach; 
 
 foreach ($author_array as $author) :
 $auth = get_userdata($author)-&gt;display_name;
 $auth_link = get_userdata($author)-&gt;user_login;
 echo &#039;&lt;a href=&quot;/author/&#039;.$auth_link.&#039;&quot;&gt;&#039;;
 echo $auth;
 echo &#039;&lt;/a&gt;&#039;;
 echo &#039;&lt;br /&gt;&#039;;
 
 endforeach; 
 ?&gt;</description>
		<content:encoded><![CDATA[<p>This might be useful to someone.<br />
I&#8217;ve taken the code above and turned it into this&#8230;<br />
This works for me and does exactly what is described above&#8230;<br />
&lt;?php<br />
 $author_array = array();<br />
 $cat_posts = get_posts(&#8216;numberposts=-1&amp;category=48&amp;orderby=author&amp;order=ASC&#8217;);</p>
<p> foreach ($cat_posts as $cat_post) :<br />
 if (!in_array($cat_post-&gt;post_author,$author_array)) {<br />
 $author_array[] = $cat_post-&gt;post_author;<br />
 }<br />
 endforeach; </p>
<p> foreach ($author_array as $author) :<br />
 $auth = get_userdata($author)-&gt;display_name;<br />
 $auth_link = get_userdata($author)-&gt;user_login;<br />
 echo &#8216;&lt;a href=&#8221;/author/&#8217;.$auth_link.&#8217;&#8221;&gt;&#8217;;<br />
 echo $auth;<br />
 echo &#8216;&lt;/a&gt;&#8217;;<br />
 echo &#8216;&lt;br /&gt;&#8217;;</p>
<p> endforeach;<br />
 ?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Interesting websites for SEO, Web Marketing and everday work from Sante &#62; &#62; October 21st - November 28th</title>
		<link>http://wpgarage.com/shorties/authors-in-categories/comment-page-1/#comment-23904</link>
		<dc:creator>Interesting websites for SEO, Web Marketing and everday work from Sante &#62; &#62; October 21st - November 28th</dc:creator>
		<pubDate>Mon, 01 Dec 2008 12:39:47 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/shorties/authors-in-categories/#comment-23904</guid>
		<description>[...]  Challenge: how to display only authors who have written in a specific category? &#124; Wordpress Garage &lt; br/&gt; automatically display on a category page only the authors who have written articles in that particular category on your WordPress Blog [...]</description>
		<content:encoded><![CDATA[<p>[...]  Challenge: how to display only authors who have written in a specific category? | Wordpress Garage &lt; br/&gt; automatically display on a category page only the authors who have written articles in that particular category on your WordPress Blog [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charly Silaban</title>
		<link>http://wpgarage.com/shorties/authors-in-categories/comment-page-1/#comment-1180</link>
		<dc:creator>Charly Silaban</dc:creator>
		<pubDate>Thu, 24 Apr 2008 05:16:21 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/shorties/authors-in-categories/#comment-1180</guid>
		<description>I have the same problem here &lt;a href=&quot;http://wordpress.org/support/topic/169195&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/support/topic/169195&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I have the same problem here <a href="http://wordpress.org/support/topic/169195" rel="nofollow">http://wordpress.org/support/topic/169195</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rebecca</title>
		<link>http://wpgarage.com/shorties/authors-in-categories/comment-page-1/#comment-1178</link>
		<dc:creator>Rebecca</dc:creator>
		<pubDate>Sun, 30 Mar 2008 10:25:37 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/shorties/authors-in-categories/#comment-1178</guid>
		<description>Hi Mark - I tried implementing the code but I think it stopped displaying authors after the first author. any ideas? Did you get it to work for you on your own site? Thanks so much</description>
		<content:encoded><![CDATA[<p>Hi Mark &#8211; I tried implementing the code but I think it stopped displaying authors after the first author. any ideas? Did you get it to work for you on your own site? Thanks so much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://wpgarage.com/shorties/authors-in-categories/comment-page-1/#comment-1179</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Fri, 28 Mar 2008 04:12:11 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/shorties/authors-in-categories/#comment-1179</guid>
		<description>argh!  lol i must be tired

instead of echo $a, use:

the_author_posts_link ();</description>
		<content:encoded><![CDATA[<p>argh!  lol i must be tired</p>
<p>instead of echo $a, use:</p>
<p>the_author_posts_link ();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://wpgarage.com/shorties/authors-in-categories/comment-page-1/#comment-1175</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Fri, 28 Mar 2008 04:11:16 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/shorties/authors-in-categories/#comment-1175</guid>
		<description>Sorry,

i have the arguments backwards for strstr:

if(!strstr($authors,$a))
{
echo $a;
$authors.=$a;
}</description>
		<content:encoded><![CDATA[<p>Sorry,</p>
<p>i have the arguments backwards for strstr:</p>
<p>if(!strstr($authors,$a))<br />
{<br />
echo $a;<br />
$authors.=$a;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://wpgarage.com/shorties/authors-in-categories/comment-page-1/#comment-1174</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Fri, 28 Mar 2008 04:10:08 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/shorties/authors-in-categories/#comment-1174</guid>
		<description>This will do it for you:


&lt;?php while (have_posts()) : the_post();
global $authordata;
$a=get_author_posts_url ($authordata);
if(!strstr($a,$authors))
{
    echo $a;
    $authors.=$a;
}</description>
		<content:encoded><![CDATA[<p>This will do it for you:</p>
<p>&lt;?php while (have_posts()) : the_post();<br />
global $authordata;<br />
$a=get_author_posts_url ($authordata);<br />
if(!strstr($a,$authors))<br />
{<br />
    echo $a;<br />
    $authors.=$a;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Display the authors that have posted to a particular category in WordPress</title>
		<link>http://wpgarage.com/shorties/authors-in-categories/comment-page-1/#comment-1173</link>
		<dc:creator>Display the authors that have posted to a particular category in WordPress</dc:creator>
		<pubDate>Thu, 27 Mar 2008 20:07:25 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/shorties/authors-in-categories/#comment-1173</guid>
		<description>[...] today Miriam at WordPress Garage posted a quick challenge: how to display a list of authors who had posted in a particular category. I had an idea at the time but I wasn&#8217;t in a position to test the idea, so now I am home I [...]</description>
		<content:encoded><![CDATA[<p>[...] today Miriam at WordPress Garage posted a quick challenge: how to display a list of authors who had posted in a particular category. I had an idea at the time but I wasn&#8217;t in a position to test the idea, so now I am home I [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miriam Schwab</title>
		<link>http://wpgarage.com/shorties/authors-in-categories/comment-page-1/#comment-1172</link>
		<dc:creator>Miriam Schwab</dc:creator>
		<pubDate>Thu, 27 Mar 2008 13:07:11 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/shorties/authors-in-categories/#comment-1172</guid>
		<description>@Ryan - I also don&#039;t have the foggiest. That&#039;s why I&#039;m asking here.

@Andrew - what you wrote looks really promising. If no one else solves it by this evening, I&#039;ll send you an email to see if you can help. I really appreciate it!!</description>
		<content:encoded><![CDATA[<p>@Ryan &#8211; I also don&#8217;t have the foggiest. That&#8217;s why I&#8217;m asking here.</p>
<p>@Andrew &#8211; what you wrote looks really promising. If no one else solves it by this evening, I&#8217;ll send you an email to see if you can help. I really appreciate it!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://wpgarage.com/shorties/authors-in-categories/comment-page-1/#comment-1177</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Thu, 27 Mar 2008 12:48:19 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/shorties/authors-in-categories/#comment-1177</guid>
		<description>Missed a bit. I am assuming that the code I have included above would return a user_id which can then be used with the get_userdata  function to get the information necessary to create a link, as I say though I am not in a position to check this right now.

I can check this and produce some working code this evening if no one has solved it by then. Feel free to drop me an e-mail.</description>
		<content:encoded><![CDATA[<p>Missed a bit. I am assuming that the code I have included above would return a user_id which can then be used with the get_userdata  function to get the information necessary to create a link, as I say though I am not in a position to check this right now.</p>
<p>I can check this and produce some working code this evening if no one has solved it by then. Feel free to drop me an e-mail.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
