<?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>Digging into WordPress &#187; attachments</title>
	<atom:link href="http://digwp.com/tag/attachments/feed/" rel="self" type="application/rss+xml" />
	<link>http://digwp.com</link>
	<description>Take your WordPress skills to the next level.</description>
	<lastBuildDate>Fri, 18 May 2012 18:21:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Attach Unattached Media Files</title>
		<link>http://digwp.com/2012/05/attach-unattached-media-files/</link>
		<comments>http://digwp.com/2012/05/attach-unattached-media-files/#comments</comments>
		<pubDate>Tue, 01 May 2012 16:24:29 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://digwp.com/?p=5832</guid>
		<description><![CDATA[Attaching any unattached media files that you may have floating around is a good way to keep things organized and running smooth. Normally, when you&#8217;re working on a post in the Edit Post screen, you click the Upload/Insert button and use the nifty drag-n-drop media uploader to get &#8216;er done. When you upload your media [...]]]></description>
			<content:encoded><![CDATA[<p>Attaching any unattached media files that you may have floating around is a good way to keep things organized and running smooth. Normally, when you&#8217;re working on a post in the <strong>Edit Post</strong> screen, you click the <strong>Upload/Insert</strong> button and use the nifty drag-n-drop media uploader to get &#8216;er done. When you upload your media files in this manner, WordPress &#8220;knows&#8221; that you want to attach the file to that particular post. Super straightforward sure, but there are situations where WordPress <em>doesn&#8217;t know</em> which post to use. In this <abbr title="Digging into WordPress">DigWP</abbr> post, we walk through the process of finding unattached media files and attaching them to their respective posts.</p>
<p><span id="more-5832"></span></p>
<h3>Why media files may be &#8220;unattached&#8221;</h3>
<p>Basically, WordPress needs to know which post to attach the file to, so if that information isn&#8217;t available, the file&#8217;s status is set to &#8220;unattached&#8221;. For example, if you have a bunch of images attached to a post, and then delete the post, the images are still visible in the <strong>Media Library</strong> and still exist in the <code>/wp-content/uploads/</code> directory, but they will be <em>unattached</em> to any particular post.</p>
<p>Another reason why you might have unattached media files is because they were uploaded directly through the <strong>Media Library</strong> instead of through a specific post. Some WordPress users like to upload lots of images up-front, before creating any posts. Are there other ways that media files become unattached? Possibly, but ultimately it doesn&#8217;t matter because it&#8217;s relatively straightforward to locate all unattached files and attach them to specific posts. Well, it is once you know how to do it..</p>
<h3>How to find your unattached media files</h3>
<p>Eliminating and/or organizing rogue files of <em>any type</em> is good practice for running a tight ship, whether it be media files, theme files, or other project files laying around on the server. When it comes to cleaning up your media files, WordPress provides two easy ways of locating everything that&#8217;s not attached to a specific post.</p>
<p><img src="http://digwp.com/wp-content/uploads/2012/04/wp-attach-media-01.jpg" alt="Attach Unattached Media Files - Step 1: Find unattached media files"></p>
<p>As seen in the previous image, the first and easiest way to find and attach your files is to click the <strong>Unattached</strong> link (1) at the top of the <strong>Media Library</strong> page. That will list all of your unattached files along with a quick link to <strong>Attach</strong> (2) the file to a specific post. This is also the second way to find unattached images, as the &#8220;Attach&#8221; link is easy to spot among all of your attached media files.</p>
<h3>How to attach your unattached media files</h3>
<p>Once you&#8217;ve found some unattached files, you&#8217;re ready to attach them to their rightful posts. There are several ways to do this, depending on where you&#8217;re at in the WordPress Admin. </p>
<ul>
<li>If you&#8217;re on the <strong>Media Library</strong> page, then you&#8217;ll see the <strong>Attach</strong> link next to the unattached file (see previous image).</li>
<li>If you&#8217;re already viewing the list of &#8220;Unattached&#8221; images, you can hover over a specific file to reveal its <strong>Attach</strong> link.</li>
<li>If you&#8217;re working on a post, click the <strong>Upload/Insert</strong> button, go to the <strong>Media Library</strong> tab, search for the image, and click the <strong>Insert into Post</strong> button.</li>
</ul>
<p>Here is a screenshot showing the &#8220;Attach&#8221; link next the file in the list of &#8220;Unattached&#8221; files:</p>
<p><img src="http://digwp.com/wp-content/uploads/2012/04/wp-attach-media-02.jpg" alt="Attach Unattached Media Files - Step 2: Click the 'Attach' button"></p>
<p>After clicking the &#8220;Attach&#8221; link, a popup window will appear, like so:</p>
<p><img src="http://digwp.com/wp-content/uploads/2012/04/wp-attach-media-03.jpg" alt="Attach Unattached Media Files - Step 3: Enter the post title and click search"></p>
<p>At this point we see some room for improvement, in that you sort of have to &#8220;know&#8221; in advance the title or contents of the post to which the file should be attached. If you&#8217;re not sure and just want to sort of browse through existing posts to find the best one, try searching with some relevant/related search terms. If you really have no idea which post to use, try searching for a super-common word like &#8220;the&#8221; or &#8220;a&#8221; and you&#8217;ll get the first 30 or so posts. Unfortunately at this time there is no way to navigate through more than the first set of results, but it may be enough to get you there. It would be good to have this option in the future (hint hint).</p>
<p><img src="http://digwp.com/wp-content/uploads/2012/04/wp-attach-media-04.jpg" alt="Attach Unattached Media Files - Step 4: Choose the correct post and click 'Select'"></p>
<p>Once you&#8217;ve found the post that you would like to use, select it and click the <strong>Select</strong> button, as shown in the previous image. That&#8217;s all it takes, after clicking &#8220;Select&#8221; WordPress does its thing and the file is attached to the selected post.</p>
<h3>How to un-attach media files</h3>
<p>Wrapping up, just wanted to point out another area where WordPress could be improved. As far as I know, there is no way to &#8220;un-attach&#8221; media files from their respective posts <em>from within the Admin area</em>. Unless somebody knows a way of doing so, the only way seems to be complete deletion of the media file in question. When working with a lot of files, each with their own meta information, this can be a rather unpleasant experience, but I digress.. Yes you can always attach the file to <em>another</em> post, but that doesn&#8217;t change the post to which it was first attached. To change that information, it&#8217;s either a trip to the database or delete the file and start over.</p>
<h3>1-minute summary</h3>
<p>To attach an unattached media file, find an <strong>Attach</strong> link, select the desired post from the list, and click the <strong>Select</strong> button. Alternately, if you&#8217;re working on a post, click the <strong>Upload/Insert</strong> button, visit the <strong>Media Library</strong> tab, locate and select the desired post, and click the <strong>Insert into Post</strong> button.</p>
<p>Taking the time to clean-up and organize your files is a great way to improve the efficiency and maintainability of your website.</p>
<p>That&#8217;s all for now, Happy attaching :)</p>
<hr />
<p><small>© 2012 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2012/05/attach-unattached-media-files/">Permalink</a> | <a href="http://digwp.com/2012/05/attach-unattached-media-files/#comments">13 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2012/05/attach-unattached-media-files/&title=Attach Unattached Media Files">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/admin/" rel="tag">Admin</a>, <a href="http://digwp.com/tag/attachments/" rel="tag">attachments</a>, <a href="http://digwp.com/tag/tips/" rel="tag">tips</a>, <a href="http://digwp.com/tag/tricks/" rel="tag">tricks</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2012/05/attach-unattached-media-files/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Awesome Image-Attachment Recipes for WordPress</title>
		<link>http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/</link>
		<comments>http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 06:10:05 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://digwp.com/?p=458</guid>
		<description><![CDATA[Recently, I found myself on the front lines of WordPress&#8217; somewhat complicated Media-Library system. The site that I was developing required a rather elaborate system of retrieving and displaying image attachments. So, using the latest version of WordPress (2.8.3 at the time), I found myself experimenting with as many template tags and custom functions as [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I found myself on the front lines of WordPress&rsquo; somewhat complicated Media-Library system. The site that I was developing required a rather elaborate system of retrieving and displaying image attachments. So, using the latest version of WordPress (2.8.3 at the time), I found myself experimenting with as many template tags and custom functions as I could find. After much experimentation, I discovered the perfect solution, and along the way I collected a healthy collection of recipes for displaying image attachments and their various types of associated information.</p>
<p>In this <acronym title="Digging into WordPress">DiW</acronym> article, you will learn some tasty ways to include image-attachment information in your posts. From echoing the latest image path to displaying custom-sized image-links for all post attachments, this article should serve as an invaluable resource for anyone working with WordPress&rsquo; Media Library and its media-attachment functionality.</p>
<p><span id="more-458"></span></p>
<h3>Basic display of gallery attachments</h3>
<p>When displaying your images via the <code>[gallery]</code> shortcode, WordPress will display image-links for each image in the gallery. Each of these image-links points to the image-gallery page for that particular image. The image gallery is created by the <code>image.php</code> template if present in your theme files. Here is a basic way to display your gallery images from within the image-gallery loop:</p>
<pre><code>&lt;a href="&lt;?php echo wp_get_attachment_url($post-&gt;ID); ?&gt;"&gt;&lt;?php echo wp_get_attachment_image($post-&gt;ID, 'medium'); ?&gt;&lt;/a&gt;</code></pre>
<p>This code will display a medium-sized image-link to the original image. To display an image attachment of a different size, replace the <code>$size</code> parameter in the <code>wp_get_attachment_image()</code> template tag. Accepted values are <code>thumbnail</code>, <code>medium</code>, <code>large</code>, or <code>full</code>. The actual dimensions of these sizes are determined by your preferences in the Media panel of the WordPress Admin.</p>
<h3>Display the URL of the latest image attachment</h3>
<p>Perhaps the most useful template tag for displaying image-attachment information is <code>wp_get_attachment_url()</code>. This function returns a full <acronym title="Uniform Resource Identifier">URI</acronym> for an attachment file. If no attachment is found, a value of <code>false</code> is returned. Here are several ways to use this tag within the loop:</p>
<pre><code>&lt;?php // display the attachment URI for post with specified ID
echo wp_get_attachment_url(7); ?&gt;

&lt;?php // display the latest attachment URI for each post from within the image.php loop
echo wp_get_attachment_url($post-&gt;ID); ?&gt;

&lt;?php // display the latest attachment URI for each post from within the index.php loop
echo wp_get_attachment_url($attachment_id); ?&gt;</code></pre>
<p>The output of this tag is similar to the following for each attachment:</p>
<p><code>http://digwp.com/wp-content/uploads/2009/08/example.png</code></p>
<p>If you are using the <code>image.php</code> file to display your attachments, use the second recipe to display the latest <acronym title="Uniform Resource Identifier">URI</acronym> for each post. If you are displaying your attachments from any other template file (e.g., <code>index.php</code>, <code>single.php</code>, etc.), use the third recipe and refer to <a href="#dynamic-post-id" title="Jump!">this section</a> of the article for the code required to generate dynamically the <code>$attachment_id</code> variable for the post ID.</p>
<h3>Display the latest image attachment as an image</h3>
<p>The <code>wp_get_attachment_image()</code> template tag is used to display the latest image attachment as an actual <acronym title="Hypertext Markup Language">HTML</acronym> image element. If no image attachment is found, a value of <code>false</code> is returned. Here are several ways to use this tag within the loop:</p>
<pre><code>&lt;?php // display medium-sized attached image for post with specified ID
echo wp_get_attachment_image(7, 'medium'); ?&gt;

&lt;?php // display the latest attached image for each post from within the image.php loop
echo wp_get_attachment_image($post-&gt;ID); ?&gt;

&lt;?php // display the latest attached image for each post from within the index.php loop
echo wp_get_attachment_image($attachment_id); ?&gt;</code></pre>
<p>The output of this tag is similar to the following for each attachment:</p>
<p><code>&lt;img src="http://digwp.com/wp-content/uploads/2009/08/example.png" class="attachment-thumbnail" height="50" width="50"&gt;</code></p>
<p>The <code>wp_get_attachment_image()</code> template tag may be customized with the following parameters:</p>
<p><code>&lt;?php wp_get_attachment_image($attachment_id, $size='thumbnail', $icon=false); ?&gt;</code></p>
<ul>
<li><code>$attachment_id</code> &#8212; ID of the desired attachment. Not required if used within an attachment loop, otherwise, refer to <a href="#dynamic-post-id" title="Jump!">this section</a> to generate the ID for non-attachment loops.</li>
<li><code>$size</code> &#8212; Size of the image shown for an image attachment: <code>thumbnail</code>, <code>medium</code>, <code>large</code> or <code>full</code></li>
<li><code>$icon</code> &#8212; (Optional) Use a media icon to represent the attachment. Default value: <code>false</code>.</li>
</ul>
<h3>Display the thumbnail of the latest image attachment</h3>
<p>I couldn&rsquo;t find any official documentation for the <code>get_attachment_icon()</code> template tag, but after some experimentation, it seems useful for displaying a thumbnail of the latest image attachment for each post. Here are some examples:</p>
<pre><code>&lt;?php // display image thumbnail for post with specified ID
echo get_attachment_icon(7); ?&gt;

&lt;?php // display image thumbnail for each post from within the image.php loop
echo get_attachment_icon($post-&gt;ID); ?&gt;

&lt;?php // display image thumbnail for each post from within the index.php loop
echo get_attachment_icon($attachment_id); ?&gt;</code></pre>
<p>The output of this tag is similar to the following for each attachment:</p>
<p><code>&lt;img src="http://digwp.com/wp-content/uploads/2009/08/example.png" title="example" alt="example"&gt;</code></p>
<p>If using this tag within an attachment loop, such as in the <code>image.php</code> or <code>attachment.php</code> theme file, the post ID parameter is generated automatically. If using within a non-attachment loop, such as in the <code>index.php</code> or <code>single.php</code> theme file, refer to <a href="#dynamic-post-id" title="Jump!">this section</a> for the code required to generate dynamically the post-ID variable.</p>
<h3>Other useful template tags for displaying image attachments</h3>
<p>Here are some other useful template tags for displaying image attachments and their related information:</p>
<pre><code>&lt;?php // returns the URL for the latest attachment thumbnail
wp_get_attachment_thumb_url($attachment_id); ?&gt;

&lt;?php // returns an image representing the latest attachment file
wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon=false); ?&gt;

&lt;?php // returns an image-link or text-link to the latest attachment file or attachment page
wp_get_attachment_link($id=0, $size='thumbnail', $permalink=false, $icon=false); 

&lt;?php // displays an image link to the latest attachment file
the_attachment_link($attachment_id); ?&gt;

&lt;?php // returns an image link to the latest attachment file
get_the_attachment_link($attachment_id);  ?&gt;

&lt;?php // returns a URI to the attachment page for the latest attachment
get_attachment_link($attachment_id);  ?&gt;</code></pre>
<p>See the next section for generating the values of the <code>$attachment_id</code> variable.</p>
<h3 id="dynamic-post-id">Dynamic generation of the post ID for non-attachment loops</h3>
<p>If you are using any of the above recipes within a <code>single.php</code>, <code>index.php</code>, or any other non-attachment loop, you will need to include the following line of code to generate the ID for each post:</p>
<pre><code>&lt;?php global $wpdb; $attachment_id = $wpdb-&gt;get_var("SELECT ID FROM $wpdb-&gt;posts WHERE post_parent = '$post-&gt;ID' 
AND post_status = 'inherit' AND post_type='attachment' ORDER BY post_date DESC LIMIT 1"); ?&gt;</code></pre>
<p>This code dynamically generates the <code>$attachment_id</code> variable that is used in some of the examples above. Here is an example showing how to display the latest attachment <acronym title="Uniform Resource Identifier">URI</acronym> for each post from within the <code>index.php</code> loop:</p>
<pre><code>&lt;?php global $wpdb; $attachment_id = $wpdb-&gt;get_var("SELECT ID FROM $wpdb-&gt;posts WHERE post_parent = '$post-&gt;ID' 
AND post_status = 'inherit' AND post_type='attachment' ORDER BY post_date DESC LIMIT 1"); 
echo wp_get_attachment_url($attachment_id); ?&gt;</code></pre>
<p>Enough of the simple stuff! Let&rsquo;s move on to some more <em>advanced</em> recipes.</p>
<h3>Display all attachments for each post</h3>
<p>Up to this point, we have been using template tags to display information related to the <em>latest attachment</em> only. With any of the above methods, the output for any of the template tags represents a <em>single</em> attachment item. In order to display <em>multiple</em> attachments for each post, we need to employ WordPress&rsquo; <code>get_children()</code> functionality. The <code>get_children()</code> tag returns an associative array of posts with post IDs as array keys. The default parameters are as follows (as of version 2.7):</p>
<pre><code>$defaults = array( 
	'post_parent' =&gt; 0,     // get children of this post ID; null value gets all children
	'post_type'   =&gt; 'any', // post type: attachment, page, revision, or any; default: any
	'numberposts' =&gt; -1,    // number of child posts to retrieve; default: -1 (unlimited)
	'post_status' =&gt; 'any', // post status: publish, draft, inherit, or any; default: any
);</code></pre>
<p>For (cough) complete information (cough), refer to the <a href="http://codex.wordpress.org/Function_Reference/get_children" title="WordPress Codex: get_children()">official documentation</a>.</p>
<p>Using this functionality, we are well-equipped to use any of the previously discussed template tags (or any other attachment-related tag) to display all of the attachments for each post in the loop. Here is the basic technique, using the <code>wp_get_attachment_link()</code> template tag:</p>
<pre><code>&lt;?php 
$args = array(
	'order'          =&gt; 'ASC',
	'post_type'      =&gt; 'attachment',
	'post_parent'    =&gt; $post-&gt;ID,
	'post_mime_type' =&gt; 'image',
	'post_status'    =&gt; null,
	'numberposts'    =&gt; -1,
);
$attachments = get_posts($args);
if ($attachments) {
	foreach ($attachments as $attachment) {
		echo apply_filters('the_title', $attachment-&gt;post_title);
		echo wp_get_attachment_link($attachment-&gt;ID, 'thumbnail', false, false);
	}
}
?&gt;</code></pre>
<p>When used within the loop, this code will output the title and thumbnail-size image-link for <em>every</em> attachment of each post within the loop. As is, the image-links point to the <acronym title="Uniform Resource Identifier">URI</acronym> of the original, full-size attachment file. To get the image-links to point to the attachment page for each image, change the third parameter in the <code>wp_get_attachment_link()</code> tag to <code>true</code>. </p>
<p>Currently, the function will display <em>all</em> attachments for each post. To limit the number of attachments displayed, change the <code>numberposts</code> value from &ldquo;<code>-1</code>&rdquo; to whatever number you wish.</p>
<p>Once you get the hang of this basic attachment-display method, you can have some fun experimenting with different output formats by swapping out and/or including additional template tags. For example, instead of displaying a thumbnail link along with the attachment title, you may want to display the <acronym title="Uniform Resource Identifier">URI</acronym> of the original attachment. To do so, you would simply replace this line:</p>
<p><code>echo wp_get_attachment_link($attachment-&gt;ID, 'thumbnail', false, false);</code></p>
<p>..with this:</p>
<p><code>wp_get_attachment_url($attachment-&gt;ID)</code></p>
<p>Now, what about all of the other tags? How to implement and integrate them into a cohesive configuration of image-attachment bliss? There are far too many possible configurations to even begin to cover them all, but I did come up with an effective way of demonstrating the configurational possibilities with a little function I like to call the &ldquo;Attachment&nbsp;Toolbox&rdquo;.</p>
<h3>Image-attachment enlightenment with the Attachment Toolbox</h3>
<p>The idea is simple: <strong>learn by example</strong>. This function is essentially a &ldquo;live&rdquo; demonstration of the various template tags and their generated output. To use this function, create a few posts and attach some images (or other types of attachments) to each of them. Then, place the following code into your theme&rsquo;s <code>functions.php</code> file:</p>
<pre><code>&lt;?php 
function attachment_toolbox($size = thumbnail) {

	if($images = get_children(array(
		'post_parent'    =&gt; get_the_ID(),
		'post_type'      =&gt; 'attachment',
		'numberposts'    =&gt; -1, // show all
		'post_status'    =&gt; null,
		'post_mime_type' =&gt; 'image',
	))) {
		foreach($images as $image) {
			$attimg   = wp_get_attachment_image($image-&gt;ID,$size);
			$atturl   = wp_get_attachment_url($image-&gt;ID);
			$attlink  = get_attachment_link($image-&gt;ID);
			$postlink = get_permalink($image-&gt;post_parent);
			$atttitle = apply_filters('the_title',$image-&gt;post_title);

			echo '&lt;p&gt;&lt;strong&gt;wp_get_attachment_image()&lt;/strong&gt;&lt;br /&gt;'.$attimg.'&lt;/p&gt;';
			echo '&lt;p&gt;&lt;strong&gt;wp_get_attachment_url()&lt;/strong&gt;&lt;br /&gt;'.$atturl.'&lt;/p&gt;';
			echo '&lt;p&gt;&lt;strong&gt;get_attachment_link()&lt;/strong&gt;&lt;br /&gt;'.$attlink.'&lt;/p&gt;';
			echo '&lt;p&gt;&lt;strong&gt;get_permalink()&lt;/strong&gt;&lt;br /&gt;'.$postlink.'&lt;/p&gt;';
			echo '&lt;p&gt;&lt;strong&gt;Title of attachment&lt;/strong&gt;&lt;br /&gt;'.$atttitle.'&lt;/p&gt;';
			echo '&lt;p&gt;&lt;strong&gt;Image link to attachment page&lt;/strong&gt;&lt;br /&gt;&lt;a href="'.$attlink.'"&gt;'.$attimg.'&lt;/a&gt;&lt;/p&gt;';
			echo '&lt;p&gt;&lt;strong&gt;Image link to attachment post&lt;/strong&gt;&lt;br /&gt;&lt;a href="'.$postlink.'"&gt;'.$attimg.'&lt;/a&gt;&lt;/p&gt;';
			echo '&lt;p&gt;&lt;strong&gt;Image link to attachment file&lt;/strong&gt;&lt;br /&gt;&lt;a href="'.$atturl.'"&gt;'.$attimg.'&lt;/a&gt;&lt;/p&gt;';
		}
	}
}
?&gt;</code></pre>
<p>Then, in your <code>index.php</code> or <code>single.php</code> (or other non-attachment) loop, call the function with the following tag:</p>
<pre><code>&lt;?php attachment_toolbox('thumbnail'); ?&gt;</code></pre>
<p>Then check the results in your browser. You will see that the code has output a variety of different attachment data, including title, attachment URI, post URI, image URI, image thumbnail, image links, and so on. After examining the output, refer back to the function itself to understand the functionality of each tag. Once you begin to see the correlation between source code and page output, you will be well equipped to transform the function in any way you see fit, or even use it as a guide to create your own custom attachment-display function. It&rsquo;s all there, just dig in and check it out&nbsp;:)</p>
<h3>Check please</h3>
<p>That does it for this fun-filled <acronym title="Digging into WordPress">DiW</acronym> article. We have seen how to display many different types of image-attachment information, including everything from thumbnail links and <acronym title="Uniform Resource Locator">URL</acronym> paths to custom-sized images and multiple attachments. This collection of recipes is by no means exhaustive, but it provides plenty of key techniques to help implement and customize your own image-attachment functionality. Working with WordPress&rsquo; Media Library can be a convoluted process, to say the least, so any tips and tricks that you happen to know will be greatly appreciated by the incredibly awesome WordPress community.</p>
<hr />
<p><small>© 2009 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/">Permalink</a> | <a href="http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/#comments">46 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/&title=Awesome Image-Attachment Recipes for WordPress">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/attachments/" rel="tag">attachments</a>, <a href="http://digwp.com/tag/images/" rel="tag">images</a>, <a href="http://digwp.com/tag/tags/" rel="tag">tags</a>, <a href="http://digwp.com/tag/tips/" rel="tag">tips</a>, <a href="http://digwp.com/tag/tricks/" rel="tag">tricks</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
	</channel>
</rss>

