<?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: How to Add Thumbnails to WordPress with Custom Fields</title>
	<atom:link href="http://www.wordpresscreme.com/how-to-add-thumbnails-to-wordpress-with-custom-fields/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wordpresscreme.com/how-to-add-thumbnails-to-wordpress-with-custom-fields/</link>
	<description>WordPress Resources, Turorials, Articles, Tips, Themes and Blog Reviews</description>
	<lastBuildDate>Mon, 28 Feb 2011 11:33:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Garrison</title>
		<link>http://www.wordpresscreme.com/how-to-add-thumbnails-to-wordpress-with-custom-fields/comment-page-1/#comment-11457</link>
		<dc:creator>Garrison</dc:creator>
		<pubDate>Fri, 08 Oct 2010 23:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.wordpresscreme.com/?p=199#comment-11457</guid>
		<description>Sorry, I meant a box with a ? in it.</description>
		<content:encoded><![CDATA[<p>Sorry, I meant a box with a ? in it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Garrison</title>
		<link>http://www.wordpresscreme.com/how-to-add-thumbnails-to-wordpress-with-custom-fields/comment-page-1/#comment-11456</link>
		<dc:creator>Garrison</dc:creator>
		<pubDate>Fri, 08 Oct 2010 23:42:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.wordpresscreme.com/?p=199#comment-11456</guid>
		<description>I tried everything you outlined above but I can&#039;t get the image to show. I get a box with an x in it when I use &quot;thumb&quot; and nothing when I use &quot;Thumbnail.&quot; This is driving me crazy.</description>
		<content:encoded><![CDATA[<p>I tried everything you outlined above but I can&#8217;t get the image to show. I get a box with an x in it when I use &#8220;thumb&#8221; and nothing when I use &#8220;Thumbnail.&#8221; This is driving me crazy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bex White</title>
		<link>http://www.wordpresscreme.com/how-to-add-thumbnails-to-wordpress-with-custom-fields/comment-page-1/#comment-1729</link>
		<dc:creator>Bex White</dc:creator>
		<pubDate>Fri, 09 Oct 2009 22:55:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.wordpresscreme.com/?p=199#comment-1729</guid>
		<description>Excellent, that worked first time for me, I have been playing around adding widgets and apps trying to figure this out having no idea that it was such a simple job. The more I experiment with Wordpress and customise it, the more I love the platform. Every minor problem or niggle I encounter is usually just my not knowing that there is a simple solution ready made and built in already.</description>
		<content:encoded><![CDATA[<p>Excellent, that worked first time for me, I have been playing around adding widgets and apps trying to figure this out having no idea that it was such a simple job. The more I experiment with WordPress and customise it, the more I love the platform. Every minor problem or niggle I encounter is usually just my not knowing that there is a simple solution ready made and built in already.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hector</title>
		<link>http://www.wordpresscreme.com/how-to-add-thumbnails-to-wordpress-with-custom-fields/comment-page-1/#comment-1375</link>
		<dc:creator>Hector</dc:creator>
		<pubDate>Fri, 11 Sep 2009 14:58:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.wordpresscreme.com/?p=199#comment-1375</guid>
		<description>Hi, Great Post. Really helped me with setting thumbnails.

I did have a question though. I’m using the Arras Theme. I’ve been successful at making a post and having a thumbnail of that post show up on the main page in the galleries.

But what i can figure out is how to make it so that the thumbnail Only shows up in the main page, but not show up in the individual post?

Please help.

Thanks!</description>
		<content:encoded><![CDATA[<p>Hi, Great Post. Really helped me with setting thumbnails.</p>
<p>I did have a question though. I’m using the Arras Theme. I’ve been successful at making a post and having a thumbnail of that post show up on the main page in the galleries.</p>
<p>But what i can figure out is how to make it so that the thumbnail Only shows up in the main page, but not show up in the individual post?</p>
<p>Please help.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neeraj</title>
		<link>http://www.wordpresscreme.com/how-to-add-thumbnails-to-wordpress-with-custom-fields/comment-page-1/#comment-1364</link>
		<dc:creator>Neeraj</dc:creator>
		<pubDate>Tue, 08 Sep 2009 04:42:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.wordpresscreme.com/?p=199#comment-1364</guid>
		<description>Thumbnail icon is coming bt thumbnail not.. plz help.. how the thumbnail will appear.
Thanks</description>
		<content:encoded><![CDATA[<p>Thumbnail icon is coming bt thumbnail not.. plz help.. how the thumbnail will appear.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Santiago</title>
		<link>http://www.wordpresscreme.com/how-to-add-thumbnails-to-wordpress-with-custom-fields/comment-page-1/#comment-93</link>
		<dc:creator>Santiago</dc:creator>
		<pubDate>Fri, 17 Apr 2009 21:58:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.wordpresscreme.com/?p=199#comment-93</guid>
		<description>Thanks!, is true, wordpress should really work to mitigate this, in upcoming realease</description>
		<content:encoded><![CDATA[<p>Thanks!, is true, wordpress should really work to mitigate this, in upcoming realease</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mariano Pagella</title>
		<link>http://www.wordpresscreme.com/how-to-add-thumbnails-to-wordpress-with-custom-fields/comment-page-1/#comment-91</link>
		<dc:creator>Mariano Pagella</dc:creator>
		<pubDate>Thu, 16 Apr 2009 22:29:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.wordpresscreme.com/?p=199#comment-91</guid>
		<description>Now this is something that wordpress has to work out better in a new release. It can be that difficult to show a simple thumbnail in a post. There should be a simple checkbox that says &quot;show thumbnail with excerpt&quot; or something like that.
I tried the custom fields, but it turned out to be really painfull and not practical when posting lots of articles. So, searching around i came up with a simple function that makes it a lot more easy.
Here it is:

function showThumb() {
  global $post, $posts;
  $idPost = $post-&gt;ID;
  ob_start();
  ob_end_clean();
  //$images = get_children(&#039;numberposts=1&amp;post_parent=&#039;.$idPost.&#039;&amp;post_type=attachment&amp;post_mime_type=image&#039;);

  $images = get_children( array(
	&#039;post_parent&#039; =&gt; $idPost,
	&#039;post_type&#039; =&gt; &#039;attachment&#039;,
	&#039;post_mime_type&#039; =&gt; &#039;image&#039;,
	&#039;orderby&#039; =&gt; &#039;menu_order ASC, ID&#039;,
	&#039;order&#039; =&gt; &#039;ASC&#039;)
  );

  if ($images) {
    $images_data = array_keys($images);
   	$image = wp_get_attachment_image_src($images_data[0], &#039;thumbnail&#039;);
	$thumb = $image[0];
  } else {
  	$thumb = bloginfo(&#039;stylesheet_directory&#039;).&quot;/images/thumb_default.jpg&quot;;
  }
  return $thumb;
}

Ir works like this: First creates an array with all the attachments of your posts, orders it by position and retrieves de first one, so the first image in your post (your can set up the position when you add the picture, like when you create a galley) Now, if there are no attachments, then it returns the default thumb&#039;s url.
The only thing you got to do now is place  inside The Loop, and it will retrieve the thumbnail url. So you dont need to set up custom fields or anything like that.

But anyway, wordpress should really work something about this in some upcoming release.</description>
		<content:encoded><![CDATA[<p>Now this is something that wordpress has to work out better in a new release. It can be that difficult to show a simple thumbnail in a post. There should be a simple checkbox that says &#8220;show thumbnail with excerpt&#8221; or something like that.<br />
I tried the custom fields, but it turned out to be really painfull and not practical when posting lots of articles. So, searching around i came up with a simple function that makes it a lot more easy.<br />
Here it is:</p>
<p>function showThumb() {<br />
  global $post, $posts;<br />
  $idPost = $post->ID;<br />
  ob_start();<br />
  ob_end_clean();<br />
  //$images = get_children(&#8216;numberposts=1&#038;post_parent=&#8217;.$idPost.&#8217;&#038;post_type=attachment&#038;post_mime_type=image&#8217;);</p>
<p>  $images = get_children( array(<br />
	&#8216;post_parent&#8217; => $idPost,<br />
	&#8216;post_type&#8217; => &#8216;attachment&#8217;,<br />
	&#8216;post_mime_type&#8217; => &#8216;image&#8217;,<br />
	&#8216;orderby&#8217; => &#8216;menu_order ASC, ID&#8217;,<br />
	&#8216;order&#8217; => &#8216;ASC&#8217;)<br />
  );</p>
<p>  if ($images) {<br />
    $images_data = array_keys($images);<br />
   	$image = wp_get_attachment_image_src($images_data[0], &#8216;thumbnail&#8217;);<br />
	$thumb = $image[0];<br />
  } else {<br />
  	$thumb = bloginfo(&#8216;stylesheet_directory&#8217;).&#8221;/images/thumb_default.jpg&#8221;;<br />
  }<br />
  return $thumb;<br />
}</p>
<p>Ir works like this: First creates an array with all the attachments of your posts, orders it by position and retrieves de first one, so the first image in your post (your can set up the position when you add the picture, like when you create a galley) Now, if there are no attachments, then it returns the default thumb&#8217;s url.<br />
The only thing you got to do now is place  inside The Loop, and it will retrieve the thumbnail url. So you dont need to set up custom fields or anything like that.</p>
<p>But anyway, wordpress should really work something about this in some upcoming release.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

