<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<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">
	<channel>
		<title>The Forums &#187; Tag: author category - Recent Posts</title>
		<link>http://www.cozmoslabs.com/forums/tags/author-category</link>
		<description>Help In Rapid Theme Development</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Sep 2010 17:15:04 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.cozmoslabs.com/forums/search.php</link>
		</textInput>
		<atom:link href="http://www.cozmoslabs.com/forums/rss/tags/author-category" rel="self" type="application/rss+xml" />

		<item>
			<title>jrobben on "Author page template"</title>
			<link>http://www.cozmoslabs.com/forums/topic/author-page-template#post-128</link>
			<pubDate>Thu, 21 Jan 2010 17:01:25 +0000</pubDate>
			<dc:creator>jrobben</dc:creator>
			<guid isPermaLink="false">128@http://www.cozmoslabs.com/forums/</guid>
			<description>&#60;p&#62;lol .. no it was not mine.&#60;/p&#62;
&#60;p&#62;I finally figured out my solution. Basically changed where in the loops the category was printing out then set a variable to test if the category had been printed.&#60;/p&#62;
&#60;p&#62;Here it is in action:&#60;br /&#62;
a post in every category - &#60;a href=&#34;http://www.rradvice.com/author/admin&#34; rel=&#34;nofollow&#34;&#62;http://www.rradvice.com/author/admin&#60;/a&#62;&#60;br /&#62;
A post in only a couple of categories  - &#60;a href=&#34;http://www.rradvice.com/author/abby&#34; rel=&#34;nofollow&#34;&#62;http://www.rradvice.com/author/abby&#60;/a&#62;&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php  if ($category-&#38;gt;cat_name != $cat_name) {
        continue;} // skip a record - DO NOT PRINT POST TITLE IF POST IS IN A DIFFERENT CATEGORY
?&#38;gt;
  &#38;lt;?php    if(!$executed) { // do once then reset $executed to false after all posts in category
  echo &#38;#39;&#38;lt;h3&#38;gt;&#38;#39; . $cat_name . &#38;#39;&#38;lt;/h3&#38;gt;&#38;#39;;
 $executed = true;
     }
	 ?&#38;gt;

&#38;lt;!-- Display the Title as a link to the Post&#38;#39;s permalink. --&#38;gt;
&#38;lt;p&#38;gt;
&#38;lt;li&#38;gt; &#38;lt;a&#38;gt;&#38;quot; rel=&#38;quot;bookmark&#38;quot; title=&#38;quot;Permanent Link to &#38;lt;?php the_title_attribute(); ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
&#38;lt;/p&#38;gt;

&#38;lt;?php endwhile; //END LOOP B
echo &#38;#39;&#38;#39;;
$executed=false;	// RESET CATEGORY SO NEXT CATEGORY HEADING WITH POSTS WILL PRINTOUT
	//Reset Query
	wp_reset_query();
			}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Gournis on "Author page template"</title>
			<link>http://www.cozmoslabs.com/forums/topic/author-page-template#post-68</link>
			<pubDate>Fri, 08 Jan 2010 08:25:36 +0000</pubDate>
			<dc:creator>Gournis</dc:creator>
			<guid isPermaLink="false">68@http://www.cozmoslabs.com/forums/</guid>
			<description>&#60;p&#62;there is photo with the bare foot, with somebody cuts his nails, i thought it was in your front page , but i cant find the link wright know :))
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jrobben on "Author page template"</title>
			<link>http://www.cozmoslabs.com/forums/topic/author-page-template#post-67</link>
			<pubDate>Thu, 07 Jan 2010 22:49:03 +0000</pubDate>
			<dc:creator>jrobben</dc:creator>
			<guid isPermaLink="false">67@http://www.cozmoslabs.com/forums/</guid>
			<description>&#60;p&#62;I am not sure what you mean by &#34;is it a S.E.O. nail? &#34;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Gournis on "Author page template"</title>
			<link>http://www.cozmoslabs.com/forums/topic/author-page-template#post-66</link>
			<pubDate>Thu, 07 Jan 2010 08:27:19 +0000</pubDate>
			<dc:creator>Gournis</dc:creator>
			<guid isPermaLink="false">66@http://www.cozmoslabs.com/forums/</guid>
			<description>&#60;p&#62;you got an interesting exaple of footer. is it a S.E.O. nail?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jrobben on "Author page template"</title>
			<link>http://www.cozmoslabs.com/forums/topic/author-page-template#post-64</link>
			<pubDate>Wed, 06 Jan 2010 18:25:39 +0000</pubDate>
			<dc:creator>jrobben</dc:creator>
			<guid isPermaLink="false">64@http://www.cozmoslabs.com/forums/</guid>
			<description>&#60;p&#62;Got the page to display only links to the authors post in each category.&#60;br /&#62;
The continue statement is what made it work. Left to do -Still would like the category names to be skipped if there are no posts by the author in that category.&#60;br /&#62;
see &#60;a href=&#34;http://www.rradvice.com/author/admin&#34; rel=&#34;nofollow&#34;&#62;http://www.rradvice.com/author/admin&#60;/a&#62;&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php //thematic_author_loop() - we won&#38;#39;t use the default thematic author loop
	  //instead will list the post sorted by category
			$categories = get_categories();

			foreach($categories as $category){
				$cat_id = $category-&#38;gt;cat_ID;
				$cat_slug = $category-&#38;gt;category_nicename;
				$cat_name = $category-&#38;gt;cat_name;

				//The Query
				query_posts(array(
					&#38;#39;category__in&#38;#39;=&#38;gt;	$cat_id,
					&#38;#39;author&#38;#39; =&#38;gt;			$authordata-&#38;gt;ID,
					&#38;#39;posts_per_page&#38;#39;=&#38;gt;	100
					));
				if(have_posts()){
						echo &#38;#39;&#38;lt;h2&#38;gt;&#38;#39; . $cat_name . &#38;#39;&#38;lt;/h2&#38;gt;&#38;#39;;
    				}

				echo &#38;#39;&#38;lt;ul&#38;gt;&#38;#39;;
				//The Loop
				while ( have_posts() ) : the_post() ;?&#38;gt;
  &#38;lt;?php
foreach ( get_the_category() as $category ) {
   // echo $category-&#38;gt;cat_name . &#38;#39; &#38;#39;;
   //  echo &#38;#39;true &#38;#39;;
//	echo	$cat_name;
}
?&#38;gt;

&#38;lt;!-- add back got right post test here --&#38;gt;

    &#38;lt;?php  if ($category-&#38;gt;cat_name != $cat_name) {
        continue;} // skip a record
?&#38;gt;
&#38;lt;!-- Display the Title as a link to the Post&#38;#39;s permalink. --&#38;gt;
&#38;lt;li&#38;gt; &#38;lt;a href=&#38;quot;&#38;lt;?php the_permalink() ?&#38;gt;&#38;quot; rel=&#38;quot;bookmark&#38;quot; title=&#38;quot;Permanent Link to &#38;lt;?php the_title_attribute(); ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/a&#38;gt;

&#38;lt;!-- to test for post outside of category if ($category-&#38;gt;cat_name != $cat_name) echo &#38;#39;not true&#38;#39; --&#38;gt;

&#38;lt;/li&#38;gt;

				&#38;lt;?php endwhile;
				echo &#38;#39;&#38;lt;/ul&#38;gt;&#38;#39;;

				//Reset Query
				wp_reset_query();
			}
 ?&#38;gt;
&#38;lt;/div&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>jrobben on "Author page template"</title>
			<link>http://www.cozmoslabs.com/forums/topic/author-page-template#post-48</link>
			<pubDate>Wed, 30 Dec 2009 16:52:50 +0000</pubDate>
			<dc:creator>jrobben</dc:creator>
			<guid isPermaLink="false">48@http://www.cozmoslabs.com/forums/</guid>
			<description>&#60;p&#62;got it to sort of work but having problems echoing the url&#60;br /&#62;
tried all sorts of ' &#34; and / combos but no luck&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php the_permalink(); ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;

here is what I am doing

//The Loop
	while ( have_posts() ) : the_post() ;?&#38;gt;
  &#38;lt;?php
foreach ( get_the_category() as $category ) {
    echo $category-&#38;gt;cat_name . &#38;#39; &#38;#39;;
}
?&#38;gt;

&#38;lt;?php  if ($category-&#38;gt;cat_name == $cat_name)  {

echo &#38;#39;&#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php the_permalink(); ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;&#38;#39;
;
 }

 else { echo &#38;#39; not true &#38;#39;; }  // for testing
 ?&#38;gt;
				&#38;lt;?php endwhile;
				echo &#38;#39;&#38;#39;;
 				//Reset Query
				wp_reset_query();
			}
 ?&#38;gt;
&#38;lt;/div&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>jrobben on "Author page template"</title>
			<link>http://www.cozmoslabs.com/forums/topic/author-page-template#post-47</link>
			<pubDate>Wed, 30 Dec 2009 01:56:12 +0000</pubDate>
			<dc:creator>jrobben</dc:creator>
			<guid isPermaLink="false">47@http://www.cozmoslabs.com/forums/</guid>
			<description>&#60;p&#62;I really like the idea of an author page sorted by categories. But when I implemented it I got all the posts listed under each category, instead of just the posts assigned to that category. &#60;/p&#62;
&#60;p&#62;If I had a total of 20 posts 5 in each of 4 categories, instead of 4 groups of 5 posts, all 20 would be listed under each of the 4 categories.&#60;/p&#62;
&#60;p&#62;I just copied your code into a blank author.php file in my child theme.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
