<?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: WordPress Custom Fields: Add Excerpts And Post Thumbnails To Theme</title>
	<atom:link href="http://tweeaks.com/wordpress/wordpress-custom-fields-add-excerpts-and-post-thumbnails-to-theme/feed/" rel="self" type="application/rss+xml" />
	<link>http://tweeaks.com/wordpress/wordpress-custom-fields-add-excerpts-and-post-thumbnails-to-theme/</link>
	<description>more than just eye popping designs</description>
	<lastBuildDate>Tue, 07 Sep 2010 23:03:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: shahid</title>
		<link>http://tweeaks.com/wordpress/wordpress-custom-fields-add-excerpts-and-post-thumbnails-to-theme/comment-page-1/#comment-1646</link>
		<dc:creator>shahid</dc:creator>
		<pubDate>Sat, 26 Jun 2010 06:44:59 +0000</pubDate>
		<guid isPermaLink="false">http://tweeaks.com/?p=3140#comment-1646</guid>
		<description>hay sir 
 
sir can u tell me how to add  &quot;Auto Post Thumbnail&quot; in wordpress 
 
sir just look like this web site &quot;http://www.theme-junkie.com&quot; 
 
Plz Sir Tell Me About This mothed 
 
my web site is &lt;a href=&quot;http://www.Gloori.Com&quot; rel=&quot;nofollow&quot;&gt;www.Gloori.Com&lt;/a&gt; 
 
this is my free wp theme 
 
sir this is my free wp theme link 
  &lt;a href=&quot;http://fthemes.com/demonstration/?wptheme=TodaysNews&quot; rel=&quot;nofollow&quot;&gt;http://fthemes.com/demonstration/?wptheme=TodaysN...&lt;/a&gt; 
 
and this is download link 
  &lt;a href=&quot;http://fthemes.com/download/?theme=todays-news&quot; rel=&quot;nofollow&quot;&gt;http://fthemes.com/download/?theme=todays-news&lt;/a&gt; 
 
me not understand how to install &quot;Auto Post Thumbnail&quot; in my wp theme 
 
plz sir tell me about this im waiting for ur reply 
byee </description>
		<content:encoded><![CDATA[<p>hay sir </p>
<p>sir can u tell me how to add  &quot;Auto Post Thumbnail&quot; in wordpress </p>
<p>sir just look like this web site &quot;http://www.theme-junkie.com&quot; </p>
<p>Plz Sir Tell Me About This mothed </p>
<p>my web site is <a href="http://www.Gloori.Com" rel="nofollow">http://www.Gloori.Com</a> </p>
<p>this is my free wp theme </p>
<p>sir this is my free wp theme link<br />
  <a href="http://fthemes.com/demonstration/?wptheme=TodaysNews" rel="nofollow"></a><a href="http://fthemes.com/demonstration/?wptheme=TodaysN.." rel="nofollow">http://fthemes.com/demonstration/?wptheme=TodaysN..</a>. </p>
<p>and this is download link<br />
  <a href="http://fthemes.com/download/?theme=todays-news" rel="nofollow">http://fthemes.com/download/?theme=todays-news</a> </p>
<p>me not understand how to install &quot;Auto Post Thumbnail&quot; in my wp theme </p>
<p>plz sir tell me about this im waiting for ur reply<br />
byee</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaredwilli</title>
		<link>http://tweeaks.com/wordpress/wordpress-custom-fields-add-excerpts-and-post-thumbnails-to-theme/comment-page-1/#comment-1609</link>
		<dc:creator>jaredwilli</dc:creator>
		<pubDate>Tue, 06 Apr 2010 15:29:04 +0000</pubDate>
		<guid isPermaLink="false">http://tweeaks.com/?p=3140#comment-1609</guid>
		<description>Yes that&#039;s not hard. You could wrap the excerpt and thumbnail image in a div with a class or id attribute, and in your Stylesheet, you could select the div img and float it left. So for example: 
 
Here I first set the variable $thumbnail to separate it from the code so it isn&#039;t as confusing. 
Then wrap the_excerpt() and the if /else statement for the image thumb in a &lt;div&gt; that has the ID &#039;excerpt&#039;.  
 
Code:  
 
&lt;?php $thumbnail = get_post_meta($post-&gt;ID, &#039;thumbnail&#039;, true); // set the thumbnail custom field ?&gt; 
 
&lt;div id=&quot;excerpt&quot;&gt; 
    &lt;?php the_excerpt(); ?&gt; 
    
   &lt;img src=&quot; 
&lt;?php  
if ($thumbnail) {  
 
/*if thumbnail custom field is set show the image src*/ 
     echo get_post_meta($post-&gt;ID, &quot;thumbnail&quot;, true);  
 
} else { 
 
/*otherwise show a default image thumb*/ 
     echo bloginfo(&quot;template_directory&quot;) , &#039;/default.jpg&#039;;  
}  
?&gt;&quot; alt=&quot;&lt;?php the_title(); ?&gt;&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot; /&gt; 
 
&lt;/div&gt;&lt;!--//end excerpt div--&gt; 
 
 
Then in your CSS Stylesheet you do something like this. 
 
#excerpt { color: #000; } 
#excerpt img { /*selects the excerpt image */ 
  float: left;        /* This is what controls which side your image is on &#039;left / right&#039; */ 
  margin: 10px;  
} 
 
This is basically the code that I use for showing thumbnails on my sites. If you are unable to get it to work, you may have a conflict CSS image style that is over-riding it. 
 
Hope this helps :) 
 
If interested, I posted a tutorial on New2WP.com on &lt;a href=&quot;&quot; target=&quot;_blank&quot;&gt;how to show category thumbnail images as the post thumbnail&lt;/a&gt;, instead of a newly defined image created for every new post. It has a couple different examples, 3 of which I have tested and know work. 
 
Maybe you&#039;d prefer trying one of those options. 
&lt;a href=&quot;http://new2wp.com/noob/2-5-ways-to-show-category-thumbnails/&quot; target=&quot;_blank&quot;&gt;http://new2wp.com/noob/2-5-ways-to-show-category-...&lt;/a&gt; </description>
		<content:encoded><![CDATA[<p>Yes that&#039;s not hard. You could wrap the excerpt and thumbnail image in a div with a class or id attribute, and in your Stylesheet, you could select the div img and float it left. So for example: </p>
<p>Here I first set the variable $thumbnail to separate it from the code so it isn&#039;t as confusing.<br />
Then wrap the_excerpt() and the if /else statement for the image thumb in a &lt;div&gt; that has the ID &#039;excerpt&#039;.  </p>
<p>Code:  </p>
<p>&lt;?php $thumbnail = get_post_meta($post-&gt;ID, &#039;thumbnail&#039;, true); // set the thumbnail custom field ?&gt; </p>
<p>&lt;div id=&quot;excerpt&quot;&gt;<br />
    &lt;?php the_excerpt(); ?&gt; </p>
<p>   &lt;img src=&quot;<br />
&lt;?php<br />
if ($thumbnail) {  </p>
<p>/*if thumbnail custom field is set show the image src*/<br />
     echo get_post_meta($post-&gt;ID, &quot;thumbnail&quot;, true);  </p>
<p>} else { </p>
<p>/*otherwise show a default image thumb*/<br />
     echo bloginfo(&quot;template_directory&quot;) , &#039;/default.jpg&#039;;<br />
}<br />
?&gt;&quot; alt=&quot;&lt;?php the_title(); ?&gt;&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot; /&gt; </p>
<p>&lt;/div&gt;&lt;!--//end excerpt div--&gt; </p>
<p>Then in your CSS Stylesheet you do something like this. </p>
<p>#excerpt { color: #000; }<br />
#excerpt img { /*selects the excerpt image */<br />
  float: left;        /* This is what controls which side your image is on &#039;left / right&#039; */<br />
  margin: 10px;<br />
} </p>
<p>This is basically the code that I use for showing thumbnails on my sites. If you are unable to get it to work, you may have a conflict CSS image style that is over-riding it. </p>
<p>Hope this helps <img src='http://tweeaks.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>If interested, I posted a tutorial on New2WP.com on <a href="" target="_blank">how to show category thumbnail images as the post thumbnail</a>, instead of a newly defined image created for every new post. It has a couple different examples, 3 of which I have tested and know work. </p>
<p>Maybe you&#039;d prefer trying one of those options.<br />
<a href="http://new2wp.com/noob/2-5-ways-to-show-category-thumbnails/" target="_blank"></a><a href="http://new2wp.com/noob/2-5-ways-to-show-category-.." rel="nofollow">http://new2wp.com/noob/2-5-ways-to-show-category-..</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nikbanks</title>
		<link>http://tweeaks.com/wordpress/wordpress-custom-fields-add-excerpts-and-post-thumbnails-to-theme/comment-page-1/#comment-1607</link>
		<dc:creator>nikbanks</dc:creator>
		<pubDate>Tue, 06 Apr 2010 07:18:54 +0000</pubDate>
		<guid isPermaLink="false">http://tweeaks.com/?p=3140#comment-1607</guid>
		<description>is there anyway to make the thumbnail appear to the left of the post excerpt for some reason i can&#039;t figure it out. also can you display more than the default amount of characters? Thank You. This was a great post </description>
		<content:encoded><![CDATA[<p>is there anyway to make the thumbnail appear to the left of the post excerpt for some reason i can&#039;t figure it out. also can you display more than the default amount of characters? Thank You. This was a great post</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaredwilli</title>
		<link>http://tweeaks.com/wordpress/wordpress-custom-fields-add-excerpts-and-post-thumbnails-to-theme/comment-page-1/#comment-1603</link>
		<dc:creator>jaredwilli</dc:creator>
		<pubDate>Mon, 05 Apr 2010 05:36:11 +0000</pubDate>
		<guid isPermaLink="false">http://tweeaks.com/?p=3140#comment-1603</guid>
		<description>I don&#039;t remember if I tested the above code or not, but here is another way to show a default image, if you don&#039;t have one for a post. 
 
&lt;?php $thumbnail = get_post_meta($post-&gt;ID, &#039;thumbnail&#039;, true); if ($thumbnail) { ?&gt; 
&lt;img src=&quot;&lt;?php echo get_post_meta($post-&gt;ID, &quot;thumbnail&quot;, true); ?&gt;&quot; alt=&quot;&lt;?php the_title(); ?&gt;&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot; /&gt; 
&lt;?php } else { ?&gt; 
&lt;img src=&quot;&lt;?php bloginfo(&#039;template_directory&#039;); ?&gt;/default.jpg&quot;  alt=&quot;&lt;?php the_title(); ?&gt;&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot; /&gt; 
&lt;?php } ?&gt; 
 
This i know works, for sure.&lt;/img&gt;&lt;/img&gt; </description>
		<content:encoded><![CDATA[<p>I don&#039;t remember if I tested the above code or not, but here is another way to show a default image, if you don&#039;t have one for a post. </p>
<p>&lt;?php $thumbnail = get_post_meta($post-&gt;ID, &#039;thumbnail&#039;, true); if ($thumbnail) { ?&gt;<br />
&lt;img src=&quot;&lt;?php echo get_post_meta($post-&gt;ID, &quot;thumbnail&quot;, true); ?&gt;&quot; alt=&quot;&lt;?php the_title(); ?&gt;&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot; /&gt;<br />
&lt;?php } else { ?&gt;<br />
&lt;img src=&quot;&lt;?php bloginfo(&#039;template_directory&#039;); ?&gt;/default.jpg&quot;  alt=&quot;&lt;?php the_title(); ?&gt;&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot; /&gt;<br />
&lt;?php } ?&gt; </p>
<p>This i know works, for sure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaredwilli</title>
		<link>http://tweeaks.com/wordpress/wordpress-custom-fields-add-excerpts-and-post-thumbnails-to-theme/comment-page-1/#comment-1584</link>
		<dc:creator>jaredwilli</dc:creator>
		<pubDate>Thu, 18 Mar 2010 20:37:39 +0000</pubDate>
		<guid isPermaLink="false">http://tweeaks.com/?p=3140#comment-1584</guid>
		<description>You could do this for example.

$thumb = get_post_meta($post-&gt;ID, &#039;thumbnail&#039; , true); // &#039;thumb&#039; is the key in the custom fields
$thumb = ( !empty( $thumb) ) ? $thumb: &#039;/link/your/default-image.jpg&#039;; // add a default image if no value exist in the custom field &#039;thumbnail&#039;
echo &#039;&#039;;</description>
		<content:encoded><![CDATA[<p>You could do this for example.</p>
<p>$thumb = get_post_meta($post-&gt;ID, 'thumbnail' , true); // 'thumb' is the key in the custom fields<br />
$thumb = ( !empty( $thumb) ) ? $thumb: '/link/your/default-image.jpg'; // add a default image if no value exist in the custom field 'thumbnail'<br />
echo '';</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaredwilli</title>
		<link>http://tweeaks.com/wordpress/wordpress-custom-fields-add-excerpts-and-post-thumbnails-to-theme/comment-page-1/#comment-1583</link>
		<dc:creator>jaredwilli</dc:creator>
		<pubDate>Thu, 18 Mar 2010 20:21:41 +0000</pubDate>
		<guid isPermaLink="false">http://tweeaks.com/?p=3140#comment-1583</guid>
		<description>BTW there is now post thumbnail support in Wordpress, just another way of adding thumbnails to your posts but it may depend on what you want to do exactly. You do have to add support for it to your theme&#039;s function.php file though. It might be worth it, it might not. 

Here&#039;s how you can do it though

http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/</description>
		<content:encoded><![CDATA[<p>BTW there is now post thumbnail support in WordPress, just another way of adding thumbnails to your posts but it may depend on what you want to do exactly. You do have to add support for it to your theme's function.php file though. It might be worth it, it might not. </p>
<p>Here's how you can do it though</p>
<p><a href="http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/" rel="nofollow">http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Betty</title>
		<link>http://tweeaks.com/wordpress/wordpress-custom-fields-add-excerpts-and-post-thumbnails-to-theme/comment-page-1/#comment-1582</link>
		<dc:creator>Betty</dc:creator>
		<pubDate>Thu, 18 Mar 2010 20:16:44 +0000</pubDate>
		<guid isPermaLink="false">http://tweeaks.com/?p=3140#comment-1582</guid>
		<description>One suggestion after implementing the code--is there a way to do a &lt;?php if... to check whether or not there is an image in custom fields? I&#039;m not sure how to remove the textual link when I don&#039;t load a custom field thumbnail. Thanks! </description>
		<content:encoded><![CDATA[<p>One suggestion after implementing the code--is there a way to do a &lt;?php if... to check whether or not there is an image in custom fields? I&#039;m not sure how to remove the textual link when I don&#039;t load a custom field thumbnail. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaredwilli</title>
		<link>http://tweeaks.com/wordpress/wordpress-custom-fields-add-excerpts-and-post-thumbnails-to-theme/comment-page-1/#comment-1581</link>
		<dc:creator>jaredwilli</dc:creator>
		<pubDate>Thu, 18 Mar 2010 19:39:31 +0000</pubDate>
		<guid isPermaLink="false">http://tweeaks.com/?p=3140#comment-1581</guid>
		<description>Yeah at first I had assumed it was difficult to use custom fields based on what other people have said, but they are really very easy, and there is so much you can do with them too. 
 
Happy to help. </description>
		<content:encoded><![CDATA[<p>Yeah at first I had assumed it was difficult to use custom fields based on what other people have said, but they are really very easy, and there is so much you can do with them too. </p>
<p>Happy to help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Betty</title>
		<link>http://tweeaks.com/wordpress/wordpress-custom-fields-add-excerpts-and-post-thumbnails-to-theme/comment-page-1/#comment-1580</link>
		<dc:creator>Betty</dc:creator>
		<pubDate>Thu, 18 Mar 2010 19:27:31 +0000</pubDate>
		<guid isPermaLink="false">http://tweeaks.com/?p=3140#comment-1580</guid>
		<description>Oh thank gosh! I&#039;ve been trying to figure out a way to input thumbnails in excerpts without having to go through plugins (SFTP server thing). Yet, the third party php and whatnot are way more complex. I have no idea what they&#039;re talking about when they say &quot;it&#039;s a pain to do custom fields&quot;--it&#039;s so flipping easy!! But thanks for the 1-2-3, Jared! </description>
		<content:encoded><![CDATA[<p>Oh thank gosh! I&#039;ve been trying to figure out a way to input thumbnails in excerpts without having to go through plugins (SFTP server thing). Yet, the third party php and whatnot are way more complex. I have no idea what they&#039;re talking about when they say &quot;it&#039;s a pain to do custom fields&quot;--it&#039;s so flipping easy!! But thanks for the 1-2-3, Jared!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://tweeaks.com/wordpress/wordpress-custom-fields-add-excerpts-and-post-thumbnails-to-theme/comment-page-1/#comment-1507</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Fri, 19 Feb 2010 23:44:04 +0000</pubDate>
		<guid isPermaLink="false">http://tweeaks.com/?p=3140#comment-1507</guid>
		<description>&lt;span class=&quot;topsy_trackback_comment&quot;&gt;&lt;span class=&quot;topsy_twitter_username&quot;&gt;&lt;span class=&quot;topsy_trackback_content&quot;&gt;RT @tweeaks Wordpress Custom Fields: Add Excerpts And Post Thumbnails To Theme http://bit.ly/5gLfwU&lt;/span&gt;&lt;/span&gt;</description>
		<content:encoded><![CDATA[<p><span class="topsy_trackback_comment"><span class="topsy_twitter_username"><span class="topsy_trackback_content">RT @tweeaks WordPress Custom Fields: Add Excerpts And Post Thumbnails To Theme <a href="http://bit.ly/5gLfwU" rel="nofollow">http://bit.ly/5gLfwU</a></span></span></span></p>
]]></content:encoded>
	</item>
</channel>
</rss>
