<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<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>WordPress &#8250; Support Topic: How do I add thumbnail images in category listing?</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Topic: How do I add thumbnail images in category listing?</description>
<language>en</language>
<pubDate>Thu, 26 Nov 2009 11:24:37 +0000</pubDate>

<item>
<title>digitalrenewal on "How do I add thumbnail images in category listing?"</title>
<link>http://wordpress.org/support/topic/282027#post-1262016</link>
<pubDate>Wed, 28 Oct 2009 15:34:51 +0000</pubDate>
<dc:creator>digitalrenewal</dc:creator>
<guid isPermaLink="false">1262016@http://wordpress.org/support/</guid>
<description>&#60;p&#62;This code works so nicely.&#60;/p&#62;
&#60;p&#62;I used the archive.php to create the category.php template, and just pasted the code after my title (i removed the_time) and before the_content.&#60;/p&#62;
&#60;p&#62;it created the right size thumbnail, left aligned it and everything.&#60;/p&#62;
&#60;p&#62;THANKS!!!!&#60;/p&#62;
&#60;p&#62;heres the whole code i used, looks pretty cool:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php while (have_posts()) : the_post(); ?&#38;gt;

&#38;lt;div class=&#38;quot;category_post&#38;quot;&#38;gt;

&#38;lt;h3 id=&#38;quot;post-&#38;lt;?php the_ID(); ?&#38;gt;&#38;quot;&#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;&#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;/h3&#38;gt;

&#38;lt;?php
	$images = get_children(
	array(
		&#38;#39;post_parent&#38;#39; =&#38;gt; $post-&#38;gt;ID,
		&#38;#39;post_status&#38;#39; =&#38;gt; &#38;#39;inherit&#38;#39;,
		&#38;#39;post_type&#38;#39; =&#38;gt; &#38;#39;attachment&#38;#39;,
		&#38;#39;post_mime_type&#38;#39; =&#38;gt; &#38;#39;image&#38;#39;,
		&#38;#39;order&#38;#39; =&#38;gt; &#38;#39;ASC&#38;#39;,
		&#38;#39;orderby&#38;#39; =&#38;gt; &#38;#39;menu_order&#38;#39;
		)
	);

	if ( $images ) {
		$count = 1;
		foreach ( $images as $id =&#38;gt; $image ) {
			if( $count === 1 ) {
				$img = wp_get_attachment_thumb_url( $image-&#38;gt;ID );
				$link = get_permalink( $post-&#38;gt;ID );
				print &#38;quot;\n\n&#38;quot; . &#38;#39;&#38;lt;div style=&#38;quot;float:left&#38;quot;&#38;gt;&#38;lt;a href=&#38;quot;&#38;#39; . $link . &#38;#39;&#38;quot;&#38;gt;&#38;lt;img src=&#38;quot;&#38;#39; . $img . &#38;#39;&#38;quot; alt=&#38;quot;&#38;quot; /&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/div&#38;gt;&#38;#39;;
			}
			$count++;
		}
	}
?&#38;gt;

&#38;lt;?php the_excerpt(); ?&#38;gt;
&#38;lt;a href=&#38;quot;&#38;lt;?php the_permalink() ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;span style=&#38;quot;color:#cc0000&#38;quot;&#38;gt;read more&#38;lt;/span&#38;gt;&#38;lt;/a&#38;gt;

&#38;lt;p class=&#38;quot;cat_meta&#38;quot;&#38;gt;&#38;lt;?php the_time(&#38;#39;M j y&#38;#39;) ?&#38;gt; &#124; &#38;lt;?php the_tags(&#38;#39;Tags: &#38;#39;, &#38;#39;, &#38;#39;, &#38;#39;&#38;#39;); ?&#38;gt; &#124; &#38;lt;?php edit_post_link(&#38;#39;Edit&#38;#39;, &#38;#39;&#38;#39;, &#38;#39; &#124; &#38;#39;); ?&#38;gt;  &#38;lt;?php comments_popup_link(&#38;#39;No Comments &#38;#187;&#38;#39;, &#38;#39;1 Comment &#38;#187;&#38;#39;, &#38;#39;% Comments &#38;#187;&#38;#39;); ?&#38;gt;&#38;lt;/p&#38;gt;

&#38;lt;br style=&#38;quot;clear:both&#38;quot; /&#38;gt;

&#38;lt;/div&#38;gt;

		&#38;lt;?php endwhile; ?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;AND HERES MY CSS:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;/* category page template style */
.category_post {border:1px solid #eee;
		margin:20px 0; padding:20px;
		font-size:14px; line-height:18px;  }

.category_post h3 {padding-bottom:10px;}
.category_post img {margin-right:20px;}
.cat_meta {font-size:11px;}
.cat_meta a {color:blue;}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>mfields on "How do I add thumbnail images in category listing?"</title>
<link>http://wordpress.org/support/topic/282027#post-1113137</link>
<pubDate>Mon, 22 Jun 2009 22:07:40 +0000</pubDate>
<dc:creator>mfields</dc:creator>
<guid isPermaLink="false">1113137@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Here is info on the loop: &#60;a href=&#34;http://codex.wordpress.org/The_Loop&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/The_Loop&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You would add this code somewhere &#34;inside&#34; the loop.&#60;/p&#62;
&#60;p&#62;I would create a new category template for this. If your theme has a category.php file, open it and save as category-###.php&#60;/p&#62;
&#60;p&#62;The ### part should be the category id of the chub category. This way the special code will only be executed when a visitor is viewing the chub category.
&#60;/p&#62;</description>
</item>
<item>
<title>skywalker786 on "How do I add thumbnail images in category listing?"</title>
<link>http://wordpress.org/support/topic/282027#post-1112644</link>
<pubDate>Mon, 22 Jun 2009 14:40:11 +0000</pubDate>
<dc:creator>skywalker786</dc:creator>
<guid isPermaLink="false">1112644@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Which loop? what file should I put this in? single.php? where exactly should I put the code?
&#60;/p&#62;</description>
</item>
<item>
<title>mfields on "How do I add thumbnail images in category listing?"</title>
<link>http://wordpress.org/support/topic/282027#post-1110480</link>
<pubDate>Fri, 19 Jun 2009 23:37:11 +0000</pubDate>
<dc:creator>mfields</dc:creator>
<guid isPermaLink="false">1110480@http://wordpress.org/support/</guid>
<description>&#60;p&#62;use this code in your loop:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
	$images = get_children(
	array(
		&#38;#39;post_parent&#38;#39; =&#38;gt; $post-&#38;gt;ID,
		&#38;#39;post_status&#38;#39; =&#38;gt; &#38;#39;inherit&#38;#39;,
		&#38;#39;post_type&#38;#39; =&#38;gt; &#38;#39;attachment&#38;#39;,
		&#38;#39;post_mime_type&#38;#39; =&#38;gt; &#38;#39;image&#38;#39;,
		&#38;#39;order&#38;#39; =&#38;gt; &#38;#39;ASC&#38;#39;,
		&#38;#39;orderby&#38;#39; =&#38;gt; &#38;#39;menu_order&#38;#39;
		)
	);

	if ( $images ) {
		$count = 1;
		foreach ( $images as $id =&#38;gt; $image ) {
			if( $count === 1 ) {
				$img = wp_get_attachment_thumb_url( $image-&#38;gt;ID );
				$link = get_permalink( $post-&#38;gt;ID );
				print &#38;quot;\n\n&#38;quot; . &#38;#39;&#38;lt;div class=&#38;quot;alignleft&#38;quot;&#38;gt;&#38;lt;a href=&#38;quot;&#38;#39; . $link . &#38;#39;&#38;quot;&#38;gt;&#38;lt;img src=&#38;quot;&#38;#39; . $img . &#38;#39;&#38;quot; alt=&#38;quot;&#38;quot; /&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/div&#38;gt;&#38;#39;;
			}
			$count++;
		}
	}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>skywalker786 on "How do I add thumbnail images in category listing?"</title>
<link>http://wordpress.org/support/topic/282027#post-1110147</link>
<pubDate>Fri, 19 Jun 2009 18:10:53 +0000</pubDate>
<dc:creator>skywalker786</dc:creator>
<guid isPermaLink="false">1110147@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I have a catergory called Chub which holds 4 descriptions and header&#60;br /&#62;
link which when clicked go to their individual pages.&#60;/p&#62;
&#60;p&#62;When someone clicks on the chub catergory they go this page &#60;a href=&#34;http://www.fishingchair.org.uk/category/chub/&#34; rel=&#34;nofollow&#34;&#62;http://www.fishingchair.org.uk/category/chub/&#60;/a&#62; which displays the 4 descriptions and header links which is a summary of their main page, in this summary page how do I add a thumbnail image next to each description? &#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
Shebs
&#60;/p&#62;</description>
</item>

</channel>
</rss>
