<?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: Retrieve and Display Images from a WordPress Post</title>
	<atom:link href="http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/feed/" rel="self" type="application/rss+xml" />
	<link>http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/</link>
	<description>by c.bavota</description>
	<lastBuildDate>Sun, 21 Mar 2010 15:13:01 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: alialib</title>
		<link>http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/comment-page-1/#comment-8339</link>
		<dc:creator>alialib</dc:creator>
		<pubDate>Wed, 17 Mar 2010 16:54:04 +0000</pubDate>
		<guid isPermaLink="false">http://bavotasan.com/?p=46#comment-8339</guid>
		<description>Matthew - superstar, replacing line 15 with &lt;pre lang=&quot;php&quot;&gt;$start=$imgBeg+$imgEnd+1;&lt;/pre&gt; fixes the code. 

c.bavota - this is a great script, but without Matthew&#039;s fix it only works for the first image.

Thanks all,
Ali</description>
		<content:encoded><![CDATA[<p>Matthew &#8211; superstar, replacing line 15 with</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$start</span><span style="color: #339933;">=</span><span style="color: #000088;">$imgBeg</span><span style="color: #339933;">+</span><span style="color: #000088;">$imgEnd</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span></pre></div></td></tr></table></div>

<p> fixes the code. </p>
<p>c.bavota &#8211; this is a great script, but without Matthew&#8217;s fix it only works for the first image.</p>
<p>Thanks all,<br />
Ali</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/comment-page-1/#comment-8274</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Mon, 15 Mar 2010 12:36:32 +0000</pubDate>
		<guid isPermaLink="false">http://bavotasan.com/?p=46#comment-8274</guid>
		<description>Brilliant!! and many thanks for sharing!</description>
		<content:encoded><![CDATA[<p>Brilliant!! and many thanks for sharing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nayan</title>
		<link>http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/comment-page-1/#comment-8166</link>
		<dc:creator>Nayan</dc:creator>
		<pubDate>Tue, 09 Mar 2010 19:26:58 +0000</pubDate>
		<guid isPermaLink="false">http://bavotasan.com/?p=46#comment-8166</guid>
		<description>Hi 

i try both separately &quot;plug-in&quot; and &quot;manual hack&quot; both are good choice, but both have one major bug, manual hack did not resize image and plug-in resize internal image only, they did not resize external image.

i have 99% external images in my blog. please suggest something how i resize external image. i prefer manual hack.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi </p>
<p>i try both separately &#8220;plug-in&#8221; and &#8220;manual hack&#8221; both are good choice, but both have one major bug, manual hack did not resize image and plug-in resize internal image only, they did not resize external image.</p>
<p>i have 99% external images in my blog. please suggest something how i resize external image. i prefer manual hack.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: c.bavota</title>
		<link>http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/comment-page-1/#comment-8025</link>
		<dc:creator>c.bavota</dc:creator>
		<pubDate>Wed, 03 Mar 2010 14:27:25 +0000</pubDate>
		<guid isPermaLink="false">http://bavotasan.com/?p=46#comment-8025</guid>
		<description>If you use it within a loop where you specify the number of posts to query than yes.</description>
		<content:encoded><![CDATA[<p>If you use it within a loop where you specify the number of posts to query than yes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivor</title>
		<link>http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/comment-page-1/#comment-8009</link>
		<dc:creator>Ivor</dc:creator>
		<pubDate>Wed, 03 Mar 2010 00:29:45 +0000</pubDate>
		<guid isPermaLink="false">http://bavotasan.com/?p=46#comment-8009</guid>
		<description>Is there a way to get the first images of the latest X number of posts with this snippet?

Thanks</description>
		<content:encoded><![CDATA[<p>Is there a way to get the first images of the latest X number of posts with this snippet?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan</title>
		<link>http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/comment-page-1/#comment-7975</link>
		<dc:creator>Nathan</dc:creator>
		<pubDate>Mon, 01 Mar 2010 15:53:27 +0000</pubDate>
		<guid isPermaLink="false">http://bavotasan.com/?p=46#comment-7975</guid>
		<description>This is exactly what I was after. Thanks!

I did have a problem to start with and that was because I had inserted my image using NextGen Gallery shortcode rather than the WP default insert image. I went back to the posts and changed it and hey presto! Works like a charm.

Many thanks.</description>
		<content:encoded><![CDATA[<p>This is exactly what I was after. Thanks!</p>
<p>I did have a problem to start with and that was because I had inserted my image using NextGen Gallery shortcode rather than the WP default insert image. I went back to the posts and changed it and hey presto! Works like a charm.</p>
<p>Many thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: callum</title>
		<link>http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/comment-page-1/#comment-7851</link>
		<dc:creator>callum</dc:creator>
		<pubDate>Mon, 22 Feb 2010 20:29:54 +0000</pubDate>
		<guid isPermaLink="false">http://bavotasan.com/?p=46#comment-7851</guid>
		<description>c, very impressive stuff. thanks, i have a question: is it possible to retrieve the original image URL. i think the call is &lt;pre lang=&quot;php&quot;&gt;echo wp_get_attachment_url($image-&gt;ID); &lt;/pre&gt; but i&#039;m not sure how to hack that into my functions.php, i&#039;d like to replace the .$link. with .$originalurl. or similar.

possible? point me in the direction, i&#039;ll work it out i&#039;m sure *cough* after days of googling.

thanks, beautiful website. congrats.</description>
		<content:encoded><![CDATA[<p>c, very impressive stuff. thanks, i have a question: is it possible to retrieve the original image URL. i think the call is</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> wp_get_attachment_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$image</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>ID<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></td></tr></table></div>

<p> but i&#8217;m not sure how to hack that into my functions.php, i&#8217;d like to replace the .$link. with .$originalurl. or similar.</p>
<p>possible? point me in the direction, i&#8217;ll work it out i&#8217;m sure *cough* after days of googling.</p>
<p>thanks, beautiful website. congrats.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: callum</title>
		<link>http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/comment-page-1/#comment-7850</link>
		<dc:creator>callum</dc:creator>
		<pubDate>Mon, 22 Feb 2010 20:25:40 +0000</pubDate>
		<guid isPermaLink="false">http://bavotasan.com/?p=46#comment-7850</guid>
		<description>I think you&#039;d remove the: &lt;pre lang=&quot;php&quot;&gt;$postOutput = preg_replace(&#039;/width=&quot;([0-9]*)&quot; height=&quot;([0-9]*)&quot;/&#039;, &#039;&#039;,$postOutput);;
&lt;/pre&gt;

code from functions.php</description>
		<content:encoded><![CDATA[<p>I think you&#8217;d remove the:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$postOutput</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/width=&quot;([0-9]*)&quot; height=&quot;([0-9]*)&quot;/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #000088;">$postOutput</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;;</span></pre></div></td></tr></table></div>

<p>code from functions.php</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adson Nunes</title>
		<link>http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/comment-page-1/#comment-7763</link>
		<dc:creator>Adson Nunes</dc:creator>
		<pubDate>Wed, 17 Feb 2010 23:30:41 +0000</pubDate>
		<guid isPermaLink="false">http://bavotasan.com/?p=46#comment-7763</guid>
		<description>Please!!

I put your pugin script in my function.php file and I need so much use it with TimThumb. Could you help been clearer. The script you posted above do not work.</description>
		<content:encoded><![CDATA[<p>Please!!</p>
<p>I put your pugin script in my function.php file and I need so much use it with TimThumb. Could you help been clearer. The script you posted above do not work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: c.bavota</title>
		<link>http://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/comment-page-1/#comment-7644</link>
		<dc:creator>c.bavota</dc:creator>
		<pubDate>Thu, 11 Feb 2010 15:51:43 +0000</pubDate>
		<guid isPermaLink="false">http://bavotasan.com/?p=46#comment-7644</guid>
		<description>A bunch of code was cutoff from your comment. Be sure to follow the instructions for placing bode between the pre tags.</description>
		<content:encoded><![CDATA[<p>A bunch of code was cutoff from your comment. Be sure to follow the instructions for placing bode between the pre tags.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
