<?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 Post Thumbnails: Migrating from Custom Fields to the Featured Image API</title>
	<atom:link href="https://www.webmaster-source.com/2012/06/11/wordpress-post-thumbnails-migrating-from-custom-fields-to-the-featured-image-api/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.webmaster-source.com/2012/06/11/wordpress-post-thumbnails-migrating-from-custom-fields-to-the-featured-image-api/</link>
	<description>Useful Resources For Webmasters</description>
	<lastBuildDate>Wed, 29 Apr 2026 13:07:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>By: Matt</title>
		<link>https://www.webmaster-source.com/2012/06/11/wordpress-post-thumbnails-migrating-from-custom-fields-to-the-featured-image-api/#comment-24981</link>
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Tue, 19 Jun 2012 20:08:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4695#comment-24981</guid>
		<description><![CDATA[Thanks. I love my blog, too. :)

I end up digging through the source when I have to, but for simpler things I often end up reinventing the wheel instead...]]></description>
		<content:encoded><![CDATA[<p>Thanks. I love my blog, too. <img src="https://www.webmaster-source.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
<p>I end up digging through the source when I have to, but for simpler things I often end up reinventing the wheel instead&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johan Ahlback</title>
		<link>https://www.webmaster-source.com/2012/06/11/wordpress-post-thumbnails-migrating-from-custom-fields-to-the-featured-image-api/#comment-24976</link>
		<dc:creator><![CDATA[Johan Ahlback]]></dc:creator>
		<pubDate>Mon, 18 Jun 2012 06:17:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4695#comment-24976</guid>
		<description><![CDATA[I always look at the source code when i want to modify something. There&#039;s always some filters or action hooks you didn&#039;t know about. Btw, love your blog.]]></description>
		<content:encoded><![CDATA[<p>I always look at the source code when i want to modify something. There&#8217;s always some filters or action hooks you didn&#8217;t know about. Btw, love your blog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>https://www.webmaster-source.com/2012/06/11/wordpress-post-thumbnails-migrating-from-custom-fields-to-the-featured-image-api/#comment-24958</link>
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Fri, 15 Jun 2012 04:54:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4695#comment-24958</guid>
		<description><![CDATA[That&#039;s good. I didn&#039;t know about that filter...]]></description>
		<content:encoded><![CDATA[<p>That&#8217;s good. I didn&#8217;t know about that filter&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johan Ahlback</title>
		<link>https://www.webmaster-source.com/2012/06/11/wordpress-post-thumbnails-migrating-from-custom-fields-to-the-featured-image-api/#comment-24951</link>
		<dc:creator><![CDATA[Johan Ahlback]]></dc:creator>
		<pubDate>Mon, 11 Jun 2012 12:15:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4695#comment-24951</guid>
		<description><![CDATA[Nice article! But not the way i would solve this problem. You should use a filter so you can use get_the_post_thumbnail and has_post_thumbnail. This should work:

add_filter(&#039;post_thumbnail_html&#039;, &#039;if_thumbnail&#039; , 10, 5);
	function if_thumbnail($html, $post_id, $post_thumbnail_id, $size, $attr){
		global $post;
		$thumbnail = get_post_meta($post-&gt;ID, &#039;thumbnail&#039;, true);
		if(!$thumbnail)
			return $html;
		return &#039;&lt;img src=&quot;&#039;. $thumbnail .&#039;&quot; /&gt;&#039;;
	}]]></description>
		<content:encoded><![CDATA[<p>Nice article! But not the way i would solve this problem. You should use a filter so you can use get_the_post_thumbnail and has_post_thumbnail. This should work:</p>
<p>add_filter(&#8216;post_thumbnail_html&#8217;, &#8216;if_thumbnail&#8217; , 10, 5);<br />
	function if_thumbnail($html, $post_id, $post_thumbnail_id, $size, $attr){<br />
		global $post;<br />
		$thumbnail = get_post_meta($post-&gt;ID, &#8216;thumbnail&#8217;, true);<br />
		if(!$thumbnail)<br />
			return $html;<br />
		return &#8216;&lt;img src=&#8221;&#8216;. $thumbnail .'&#8221; /&gt;';<br />
	}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/


Served from: www.webmaster-source.com @ 2026-04-29 13:21:36 by W3 Total Cache
-->