<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sean Hayes - professional WordPress consulting &#187; 2.9</title>
	<atom:link href="http://www.seanhayes.biz/tag/2-9/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.seanhayes.biz</link>
	<description></description>
	<lastBuildDate>Mon, 12 Jul 2010 18:55:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress 2.9 &#8211; adding image thumbnails to your blog</title>
		<link>http://www.seanhayes.biz/2010/wordpress-2-9-adding-image-thumbnails-to-your-blog/</link>
		<comments>http://www.seanhayes.biz/2010/wordpress-2-9-adding-image-thumbnails-to-your-blog/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 15:18:36 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[2.9]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.seanhayes.biz/?p=273</guid>
		<description><![CDATA[
			
				
			
		
One of the new features of WordPress 2.9 and above is having a thumbnail associated with a post. It&#8217;s common to have themes that retrieve the first image found in a post and use that as the post thumbnail. But that may not be what you need. The inclusion of images in any post makes [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.seanhayes.biz%2F2010%2Fwordpress-2-9-adding-image-thumbnails-to-your-blog%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.seanhayes.biz%2F2010%2Fwordpress-2-9-adding-image-thumbnails-to-your-blog%2F&amp;source=seanchayes&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>One of the new features of WordPress 2.9 and above is having a thumbnail associated with a post. It&#8217;s common to have themes that retrieve the first image found in a post and use that as the post thumbnail. But that may not be what you need. The inclusion of images in any post makes for a more interesting read but having to pick the first image to match the post content and have the responsibility of being the post thumbnail is now a thing of the past.</p>
<p>Adding a thumbnail is easy and is done</p>
<div id="attachment_281" class="wp-caption alignright" style="width: 310px"><a href="http://www.seanhayes.biz/wp-content/uploads/2010/01/seanhayesbiz-thumbnail.jpg"><img class="size-medium wp-image-281 " title="Thumbnail button in media dialog" src="http://www.seanhayes.biz/wp-content/uploads/2010/01/seanhayesbiz-thumbnail-300x86.jpg" alt="seanhayesbiz-thumbnail" width="300" height="86" /></a><p class="wp-caption-text">Thumbnail button in media dialog</p></div>
<p>when editing your post. There is a new sidebar / widget called &#8220;Post Thumbnail&#8221; with a clicky called &#8220;Set Thumbnail&#8221;. At any point during the post writing process click on Set Thumbnail and the familiar media dialog will appear. Pick your image from the available images in your library or upload a new image. Select the image by choosing &#8220;Show&#8221; and then at the bottom of the dialog there&#8217;s a clicky labelled &#8220;Use as thumbnail&#8221;. When you click that the image you were viewing becomes the thumbnail associated with that post.</p>
<p>Now, if your theme doesn&#8217;t support the thumbnail feature in WordPress 2.9 you can make some quick modifications to your themes functions.php and then to any or all of the individual theme files you want the thumbnail to be active such as index.php, single.php, archive.php.</p>
<p>Thumbnail support is added to a theme by simply adding the following line to the end of your functions.php file (before the last line and &#8220;?&gt;&#8221;).</p>
<pre class="brush: php;">add_theme_support( 'post-thumbnails' );</pre>
<p>Then you add the modification for the index.php (and subsequently the others):</p>
<pre class="brush: php; highlight: [3,4,5,6,7,8,9];">
					&lt;h2&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
				&lt;?php
					if ( has_post_thumbnail() ) {
						?&gt;&lt;div class=&quot;wp-caption alignright&quot;&gt;&lt;?php
						the_post_thumbnail();
						?&gt;&lt;/div&gt;&lt;?php
					} else {
						// the current post lacks a thumbnail
					}
				?&gt;
					&lt;?php the_content(''); ?&gt;
</pre>
<p>For my theme, a great free theme from <a rel="nofollow" href="http://www.seanhayes.biz/goto/woothemes/273/2">woothemes</a>, I placed the thumbnail in it&#8217;s own wp-caption styled div and aligned it right in my posts.</p>
<p>Sources:</p>
<p>http://codex.wordpress.org/Post_Thumbnails</p>
<p>http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanhayes.biz/2010/wordpress-2-9-adding-image-thumbnails-to-your-blog/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc (user agent is rejected)
Database Caching using apc

Served from: www.seanhayes.biz @ 2010-09-09 01:50:23 -->