<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Aldenta: Handcrafting the Web</title>
	
	<link>http://www.aldenta.com</link>
	<description>Handcrafting the Web by John Ford</description>
	<lastBuildDate>Sat, 01 May 2010 05:49:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Aldenta" /><feedburner:info uri="aldenta" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>Aldenta</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>WordCamp San Francisco</title>
		<link>http://feedproxy.google.com/~r/Aldenta/~3/11WzAUYqygQ/</link>
		<comments>http://www.aldenta.com/2010/04/30/wordcamp-san-francisco/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 14:00:38 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Gatherings]]></category>

		<guid isPermaLink="false">http://www.aldenta.com/?p=198</guid>
		<description><![CDATA[There&#8217;s an amazing lineup of speakers at WordCamp SF tomorrow. I&#8217;m grateful to be a part of the list and hope you&#8217;ll join me for a riveting session titled &#8220;Living with Our Computers… and Keeping it Healthy&#8220;. You&#8217;re guaranteed to laugh as I make fun of myself and discuss the ups and downs of the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://2010.sf.wordcamp.org/schedule/session-descriptions/#johnf"><img src="http://www.aldenta.com/wp-content/uploads/2010/04/wcsf-presenting-s.png" alt="WordCamp San Francisco 2010" title="WordCamp San Francisco 2010" width="180" height="180" class="alignright size-full wp-image-201" /></a> There&#8217;s an <a href="http://2010.sf.wordcamp.org/speakers/">amazing lineup of speakers</a> at WordCamp SF tomorrow. I&#8217;m grateful to be a part of the list and hope you&#8217;ll join me for a riveting session titled &#8220;<a href="http://2010.sf.wordcamp.org/schedule/session-descriptions/#johnf">Living with Our Computers… and Keeping it Healthy</a>&#8220;. You&#8217;re guaranteed to laugh as I make fun of myself and discuss the ups and downs of the co-dependent relationships we have with our computers.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Aldenta?a=11WzAUYqygQ:6RPyGCKZPuE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=11WzAUYqygQ:6RPyGCKZPuE:jXjh0Yn0yPc"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=jXjh0Yn0yPc" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=11WzAUYqygQ:6RPyGCKZPuE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Aldenta?i=11WzAUYqygQ:6RPyGCKZPuE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=11WzAUYqygQ:6RPyGCKZPuE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aldenta.com/2010/04/30/wordcamp-san-francisco/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.aldenta.com/2010/04/30/wordcamp-san-francisco/</feedburner:origLink></item>
		<item>
		<title>Meetup: WordPress in Depth</title>
		<link>http://feedproxy.google.com/~r/Aldenta/~3/FLn39HeDuB8/</link>
		<comments>http://www.aldenta.com/2010/02/15/meetup-wordpress-in-depth/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 17:24:29 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Gatherings]]></category>
		<category><![CDATA[demystifying the web]]></category>
		<category><![CDATA[Greensboro Public Library]]></category>
		<category><![CDATA[John Ford]]></category>
		<category><![CDATA[Meetup]]></category>
		<category><![CDATA[Triad]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.aldenta.com/?p=180</guid>
		<description><![CDATA[As part of the Triad Web Meetup blogging series, I&#8217;ll be giving a detailed look at how to use WordPress. Some of the items that will be covered include: Walking through a WordPress installation on a web server Navigating the admin tool Installing themes and plugins Customizing themes Using WordPress as a Content Management System [...]]]></description>
			<content:encoded><![CDATA[<div class="vevent"><a href="http://www.wordpress.org/"><img src="http://www.aldenta.com/wp-content/uploads/2010/02/wordpress-logo.png" alt="WordPress Logo" title="WordPress Logo" width="200" height="124" class="alignright size-full wp-image-182" /></a>
<div class="description">
<p>As part of the <a href="http://www.meetup.com/triadweb/">Triad Web Meetup</a> blogging series, I&#8217;ll be giving a detailed look at how to use WordPress. Some of the items that will be covered include:</p>
<ul>
<li>Walking through a WordPress installation on a web server</li>
<li>Navigating the admin tool</li>
<li>Installing themes and plugins</li>
<li>Customizing themes</li>
<li>Using WordPress as a Content Management System</li>
<li>The possibilities of WordPress (it&#8217;s not just a blogging tool)</li>
</ul>
<p>All skill levels are welcome and there is no need for previous WordPress experience. Let me know if there is anything else you&#8217;d like to learn about WordPress. We usually have time for specific questions after the presentation.</p>
</div>
<p><strong>What</strong>: <span class="summary">WordPress in Depth</span><br />
<strong>When</strong>: <abbr class="dtstart" title="20100217T1900-0500">February, 17 2010 7:00pm</abbr> &#8211; <abbr class="dtend" title="20100217T2030-0500"> 8:30pm</abbr><br />
<strong>Where</strong>: <span class="location">Greensboro Public Library Downtown (take a right as soon as you walk in and head to the end of the hall)</span><br />
<strong>RSVP &#038; Details</strong>: <a class="url" href="http://www.meetup.com/triadweb/calendar/12373671/">Triad Web Meetup</a></p>
</div>
<p>These events are always free and everyone is welcome so please spread the word!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Aldenta?a=FLn39HeDuB8:EnwDTdzbcwM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=FLn39HeDuB8:EnwDTdzbcwM:jXjh0Yn0yPc"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=jXjh0Yn0yPc" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=FLn39HeDuB8:EnwDTdzbcwM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Aldenta?i=FLn39HeDuB8:EnwDTdzbcwM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=FLn39HeDuB8:EnwDTdzbcwM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aldenta.com/2010/02/15/meetup-wordpress-in-depth/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.aldenta.com/2010/02/15/meetup-wordpress-in-depth/</feedburner:origLink></item>
		<item>
		<title>Gordon: A Flash runtime written in JavaScript</title>
		<link>http://feedproxy.google.com/~r/Aldenta/~3/xdzkzdv2xeI/</link>
		<comments>http://www.aldenta.com/2010/01/13/gordon-a-flash-runtime-written-in-javascript/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 19:40:38 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Gordon]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.aldenta.com/?p=173</guid>
		<description><![CDATA[Ok, I&#8217;m super stoked about the possibilities of this one. Gordon is an open source Flash™ runtime written in pure JavaScript. Give some of these demos a try on your iPhone. They don&#8217;t run as fast as they do on the computer but OMG Flash on the iPhone! http://jancona.com/gordon/demos/blue.html http://jancona.com/gordon/demos/tiger.html http://jancona.com/gordon/demos/trip.html (thanks Mark)]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.aldenta.com/wp-content/uploads/2010/01/gordon-js.png" alt="" title="Gordon Example" width="500" height="365" class="alignnone size-full wp-image-174" /></p>
<p>Ok, I&#8217;m super stoked about the possibilities of this one.  <a href="http://github.com/tobeytailor/gordon">Gordon</a> is an open source Flash™ runtime written in pure JavaScript. Give some of these demos a try on your iPhone. They don&#8217;t run as fast as they do on the computer but <strong>OMG Flash on the iPhone!</strong></p>
<ul>
<li><a href="http://jancona.com/gordon/demos/blue.html">http://jancona.com/gordon/demos/blue.html</a></li>
<li><a href="http://jancona.com/gordon/demos/tiger.html">http://jancona.com/gordon/demos/tiger.html</a></li>
<li><a href="http://jancona.com/gordon/demos/trip.html">http://jancona.com/gordon/demos/trip.html</a></li>
</ul>
<p><small>(thanks <a href="http://markwunsch.com/">Mark</a>)</small></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Aldenta?a=xdzkzdv2xeI:vGfSESpufaE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=xdzkzdv2xeI:vGfSESpufaE:jXjh0Yn0yPc"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=jXjh0Yn0yPc" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=xdzkzdv2xeI:vGfSESpufaE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Aldenta?i=xdzkzdv2xeI:vGfSESpufaE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=xdzkzdv2xeI:vGfSESpufaE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aldenta.com/2010/01/13/gordon-a-flash-runtime-written-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.aldenta.com/2010/01/13/gordon-a-flash-runtime-written-in-javascript/</feedburner:origLink></item>
		<item>
		<title>WordCamp New York City 2009</title>
		<link>http://feedproxy.google.com/~r/Aldenta/~3/qSADM1W7jLc/</link>
		<comments>http://www.aldenta.com/2009/10/25/wordcamp-new-york-city-2009/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 19:56:21 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Gatherings]]></category>
		<category><![CDATA[AIGA]]></category>
		<category><![CDATA[NYC]]></category>
		<category><![CDATA[swissmiss]]></category>
		<category><![CDATA[WordCamp]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.aldenta.com/?p=163</guid>
		<description><![CDATA[Soon after the swissmiss AIGA talk in Milwaukee (November 6th) I&#8217;m going to hit WordCamp NYC (November 14-15). Hope to see you there!]]></description>
			<content:encoded><![CDATA[<p><a href="http://2009.newyork.wordcamp.org/"><img src="http://www.aldenta.com/wp-content/uploads/2009/10/wcnyc-attending-125.jpg" alt="WordCampNYC – Nov 14-15" title="WordCampNYC – Nov 14-15" width="125" height="125" class="alignright size-full wp-image-169" /></a> Soon after the <a href="http://www.swiss-miss.com/2009/10/hey-milwaukee.html">swissmiss AIGA talk in Milwaukee</a> (November 6th) I&#8217;m going to hit <a href="http://2009.newyork.wordcamp.org/">WordCamp NYC</a> (November 14-15). Hope to see you there!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Aldenta?a=qSADM1W7jLc:w3iA2hIaUYY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=qSADM1W7jLc:w3iA2hIaUYY:jXjh0Yn0yPc"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=jXjh0Yn0yPc" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=qSADM1W7jLc:w3iA2hIaUYY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Aldenta?i=qSADM1W7jLc:w3iA2hIaUYY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=qSADM1W7jLc:w3iA2hIaUYY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aldenta.com/2009/10/25/wordcamp-new-york-city-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.aldenta.com/2009/10/25/wordcamp-new-york-city-2009/</feedburner:origLink></item>
		<item>
		<title>Meetup: jQuery Overview</title>
		<link>http://feedproxy.google.com/~r/Aldenta/~3/rbja85sVdI0/</link>
		<comments>http://www.aldenta.com/2009/09/14/meetup-jquery-overview/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 20:30:57 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Gatherings]]></category>
		<category><![CDATA[demystifying the web]]></category>
		<category><![CDATA[Greensboro Public Library]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[John Ford]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Meetup]]></category>
		<category><![CDATA[Triad]]></category>

		<guid isPermaLink="false">http://www.aldenta.com/?p=153</guid>
		<description><![CDATA[Have you seen animations on sites without the use of flash? Have you noticed calendars widgets, drag n&#8217; drop features, fading elements and all sorts of dynamic things happening on websites these days? Have you heard of AJAX and want to know what it is and why it&#8217;s such a big deal? jQuery is a [...]]]></description>
			<content:encoded><![CDATA[<div class="vevent"><a href="http://www.meetup.com/triadweb/"><img src="http://www.aldenta.com/wp-content/uploads/2009/09/jquery-logo.png" alt="jQuery" title="jQuery" width="200" height="50" class="alignnone size-full wp-image-156" style="float:right" /></a>
<div class="description">
<p>Have you seen animations on sites without the use of flash? Have you noticed calendars widgets, drag n&#8217; drop features, fading elements and all sorts of dynamic things happening on websites these days? Have you heard of AJAX and want to know what it is and why it&#8217;s such a big deal?</p>
<p><a href="http://jquery.com/">jQuery</a> is a JavaScript library that lets you do all sorts of great things with your websites. Google, Dell, NBC, and WordPress are just a few companies that use jQuery to spice things up. jQuery is one of the tools that helps web applications respond more quickly to user input and mimic some of the user-friendly features of desktop applications.</p>
<p>This presentation will go into some technical details but, don&#8217;t worry, background information and examples will help put the pieces together. If you&#8217;re not a developer, you&#8217;ll leave with a deeper understanding of how websites work. If you code, then you&#8217;ll have another tool to add to your arsenal.</p>
</div>
<p><strong>What</strong>: <span class="summary">jQuery Overview</span><br />
<strong>When</strong>: <abbr class="dtstart" title="20090916T1900-0500">September, 16 2009 7:00pm</abbr> &#8211; <abbr class="dtend" title="20090916T2030-0500"> 8:30pm</abbr><br />
<strong>Where</strong>: <span class="location">Greensboro Public Library Downtown (take a right as soon as you walk in and head to the end of the hall)</span><br />
<strong>RSVP &#038; Details</strong>: <a class="url" href="http://www.meetup.com/triadweb/calendar/11152532/">Triad Web Meetup</a></p>
</div>
<p>These events are always free and everyone is welcome so please spread the word!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Aldenta?a=rbja85sVdI0:lNQjuHVfZE0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=rbja85sVdI0:lNQjuHVfZE0:jXjh0Yn0yPc"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=jXjh0Yn0yPc" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=rbja85sVdI0:lNQjuHVfZE0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Aldenta?i=rbja85sVdI0:lNQjuHVfZE0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=rbja85sVdI0:lNQjuHVfZE0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aldenta.com/2009/09/14/meetup-jquery-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.aldenta.com/2009/09/14/meetup-jquery-overview/</feedburner:origLink></item>
		<item>
		<title>Programmatically Pull Attachments from WordPress Posts</title>
		<link>http://feedproxy.google.com/~r/Aldenta/~3/MrzzjPgQAq8/</link>
		<comments>http://www.aldenta.com/2009/05/05/programmatically-pull-attachments-from-wordpress-posts/#comments</comments>
		<pubDate>Tue, 05 May 2009 13:59:33 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Example Code]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.aldenta.com/?p=138</guid>
		<description><![CDATA[One of my favorite tricks in using WordPress as a CMS is to have it handle photo resizing and insertion into pages automatically. For example, swissmiss and I just launched Convert (a NYC based Green Roof Service) today. Within the projects section they display photos of the green roofing projects they&#8217;ve done and let you [...]]]></description>
			<content:encoded><![CDATA[<p>One of my favorite tricks in using WordPress as a CMS is to have it handle photo resizing and insertion into pages automatically.  For example, <a href="http://www.swiss-miss.com/">swissmiss</a> and I just launched <a href="http://www.redefinetheskyline.com/">Convert (a NYC based Green Roof Service)</a> today.  Within the <a href="http://www.redefinetheskyline.com/projects/">projects section</a> they display photos of the green roofing projects they&#8217;ve done and let you download a project sheet PDF.</p>
<p>It would be quite a burden for the client to have to know how to create all of the appropriate image sizes, upload the photos and insert the correct HTML tags.  So here&#8217;s what we&#8217;ve done instead:</p>
<p>First, we set the WordPress image sizes to match the thumbnail and large sizes that we needed by going to Settings->Media in the admin tool.</p>
<p>Next, the client just has to upload all of their photos and a PDF for the project sheet.  The images are automatically scaled by WordPress and attached to the page.  They can also change the order the photos appear by dragging/dropping them in the admin tool.</p>
<p>Finally, adding this simple snippet of code to the functions.php in their theme, I can ask for all of the images associated with the post.</p>
<pre>
// get all of the images attached to the current post
function aldenta_get_images($size = 'thumbnail') {
	global $post;

	$photos = get_children( array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') );

	$results = array();

	if ($photos) {
		foreach ($photos as $photo) {
			// get the correct image html for the selected size
			$results[] = wp_get_attachment_image($photo->ID, $size);
		}
	}

	return $results;
}
</pre>
<p>So, if you want all of the thumbnail images (as an array of html tags) you can make the default call:</p>
<pre>$photos = aldenta_get_images();</pre>
<p>If you want all of the medium sized images you pass medium as the size:</p>
<pre>$photos = aldenta_get_images('medium');</pre>
<p>My function has a bit more going on inside of it but you get the idea of what you can do with this.  Another way I like to use it is to pull the first image from the post.  Sometimes, you want to display a thumbnail image that represents a post.  Here&#8217;s how I like to do that:</p>
<pre>
// get the first image attached to the current post
function aldenta_get_post_image($size = 'thumbnail') {
	global $post;

	$photos = get_children( array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') );

	if ($photos) {
		$photo = array_shift($photos);
		return wp_get_attachment_image($photo->ID, $size);
	}

	return false;
}

// the html tag for the first image or false if no image is found
$photo = aldenta_get_post_image();
</pre>
<p>What if you want to get the PDF attached to the post?  No problem &#8211; it works the same but you change the mime type to application/pdf.</p>
<pre>
// get the first PDF attached to the current post
function aldenta_get_post_pdf() {
	global $post;

	$attachments = get_children( array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'application/pdf', 'order' => 'ASC', 'orderby' => 'menu_order ID') );

	if ($attachments) {
		$attachment = array_shift($attachments);
		return wp_get_attachment_url($attachment->ID);
	}

	return false;
}

// the url to the first pdf or false if no pdf is found
$pdf = aldenta_get_post_pdf();
</pre>
<p>This technique has helped me tremendously and I hope it does the same for you.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Aldenta?a=MrzzjPgQAq8:jQhjcJD1AKk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=MrzzjPgQAq8:jQhjcJD1AKk:jXjh0Yn0yPc"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=jXjh0Yn0yPc" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=MrzzjPgQAq8:jQhjcJD1AKk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Aldenta?i=MrzzjPgQAq8:jQhjcJD1AKk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=MrzzjPgQAq8:jQhjcJD1AKk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aldenta.com/2009/05/05/programmatically-pull-attachments-from-wordpress-posts/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		<feedburner:origLink>http://www.aldenta.com/2009/05/05/programmatically-pull-attachments-from-wordpress-posts/</feedburner:origLink></item>
		<item>
		<title>Happy Earth Day!</title>
		<link>http://feedproxy.google.com/~r/Aldenta/~3/EuB57yQEeFw/</link>
		<comments>http://www.aldenta.com/2009/04/22/happy-earth-day/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 13:01:22 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Earth Day]]></category>

		<guid isPermaLink="false">http://www.aldenta.com/?p=130</guid>
		<description><![CDATA[As you can see, I&#8217;m sporting one of my favorite shirts today. Since I&#8217;m a geek, and have fun electronics, I try to keep everything turned off and unplugged when not in use. The laptop gets powered down at night and the power strip switched off where all of the electronics are plugged in. Actually, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.aldenta.com/wp-content/uploads/2009/04/play-station-500x375.jpg" alt="play station shirt" title="play station" width="500" height="375" class="alignnone size-medium wp-image-134" /></p>
<p>As you can see, I&#8217;m sporting <a href="http://www.wireandtwine.com/store/products/playstation.html">one of my favorite shirts</a> today.</p>
<p>Since I&#8217;m a geek, and have fun electronics, I try to keep everything turned off and unplugged when not in use.  The laptop gets powered down at night and the power strip switched off where all of the electronics are plugged in.  Actually, in support of Earth Day I think I should keep everything turned off and skip work&#8230;</p>
<p>What do you do to help out the Earth?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Aldenta?a=EuB57yQEeFw:EmMpuxqqU-4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=EuB57yQEeFw:EmMpuxqqU-4:jXjh0Yn0yPc"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=jXjh0Yn0yPc" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=EuB57yQEeFw:EmMpuxqqU-4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Aldenta?i=EuB57yQEeFw:EmMpuxqqU-4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=EuB57yQEeFw:EmMpuxqqU-4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aldenta.com/2009/04/22/happy-earth-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.aldenta.com/2009/04/22/happy-earth-day/</feedburner:origLink></item>
		<item>
		<title>Meetup: Intro to WordPress</title>
		<link>http://feedproxy.google.com/~r/Aldenta/~3/f8HwZEKU0BY/</link>
		<comments>http://www.aldenta.com/2009/04/21/meetup-intro-to-wordpress/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 18:19:51 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Gatherings]]></category>
		<category><![CDATA[demystifying the web]]></category>
		<category><![CDATA[Greensboro Public Library]]></category>
		<category><![CDATA[John Ford]]></category>
		<category><![CDATA[Meetup]]></category>
		<category><![CDATA[Triad]]></category>

		<guid isPermaLink="false">http://www.aldenta.com/?p=122</guid>
		<description><![CDATA[This meetup I&#8217;ll be covering how to install WordPress from scratch, getting started with creating/modifying a WordPress theme, the basics of the admin and show some examples of what can be done with WordPress as a CMS. Bring your questions and any WordPress sites that you&#8217;d like to show the group. All skill levels should [...]]]></description>
			<content:encoded><![CDATA[<div class="vevent"><a href="http://www.meetup.com/triadweb/"><img  alt="Triad Web Meetup" src="http://img.meetup.com/img/logo/small/w/webdesign.png" style="float: right;" /></a>
<div class="description">
<p>This meetup I&#8217;ll be covering how to install WordPress from scratch, getting started with creating/modifying a WordPress theme, the basics of the admin and show some examples of what can be done with WordPress as a CMS.</p>
<p>Bring your questions and any WordPress sites that you&#8217;d like to show the group.  All skill levels should be able to take away something from the presentation.</p>
</div>
<p>What: <span class="summary">Intro to WordPress</span><br />
When: <abbr class="dtstart" title="20090422T1900-0500">April, 22 2009 7:00pm</abbr> &#8211; <abbr class="dtend" title="20090422T2030-0500"> 8:30pm</abbr><br />
Where: <span class="location">Greensboro Public Library Downtown (take a right as soon as you walk in and head to the end of the hall)</span><br />
RSVP: <a class="url" href="http://www.meetup.com/triadweb/calendar/9984313/">Triad Web Meetup</a></p>
</div>
<p>These events are always free and everyone is welcome so please spread the word!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Aldenta?a=f8HwZEKU0BY:wS3bphdfQuY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=f8HwZEKU0BY:wS3bphdfQuY:jXjh0Yn0yPc"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=jXjh0Yn0yPc" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=f8HwZEKU0BY:wS3bphdfQuY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Aldenta?i=f8HwZEKU0BY:wS3bphdfQuY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Aldenta?a=f8HwZEKU0BY:wS3bphdfQuY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Aldenta?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aldenta.com/2009/04/21/meetup-intro-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.aldenta.com/2009/04/21/meetup-intro-to-wordpress/</feedburner:origLink></item>
		<item>
		<title>Stop Mailing Me Phone Books</title>
		<link>http://feedproxy.google.com/~r/Aldenta/~3/iE_jXfV-608/</link>
		<comments>http://www.aldenta.com/2009/02/17/stop-mailing-me-phone-books/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 21:58:31 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[YellowPages.com]]></category>

		<guid isPermaLink="false">http://www.aldenta.com/?p=115</guid>
		<description><![CDATA[With Google&#8217;s local search, and sites like YellowPages.com, I haven&#8217;t opened a phone book in years. The printed books are such a waste of resources and time. I also get the same book delivered to my home and work addresses. I contacted YellowPages.com via email and they were nice enough to give me a list [...]]]></description>
			<content:encoded><![CDATA[<p>With <a href="http://maps.google.com/">Google&#8217;s local search</a>, and sites like <a href="http://www.yellowpages.com/">YellowPages.com</a>, I haven&#8217;t opened a phone book in years.  The printed books are such a waste of resources and time.  I also get the same book delivered to my home and work addresses.</p>
<p>I contacted YellowPages.com via email and they were nice enough to give me a list of local providers who are responsible for phone books.  So, I called Bell South, my local book provider, and removed both of my addresses from their mailing list.</p>
<ul>
<li>AMERITECH: 1-800-346-4377</li>
<li>BELL ATLANTIC/VERIZON: 1-800-346-9639</li>
<li>BELL SOUTH: 1-800-682-4000</li>
<li>GTE: 1-800-346-9639</li>
<li>MCI: 1-800-444-3333</li>
<li>PAC BELL: 1-800-848-8000</li>
<li>SWBELL: 1-800-792-2665</li>
</ul>
<p>Get rid of these monstrous books and help save a tree (and fuel, paper waste, water, forest animals, money and everything else that&#8217;s connected to producing a phone book)!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/Aldenta?a=ZlJrD6Mm"><img src="http://feeds.feedburner.com/~f/Aldenta?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/Aldenta?a=k9arlhkr"><img src="http://feeds.feedburner.com/~f/Aldenta?d=2802" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/Aldenta?a=giNsA7I8"><img src="http://feeds.feedburner.com/~f/Aldenta?i=giNsA7I8" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/Aldenta?a=jUKt3Qqi"><img src="http://feeds.feedburner.com/~f/Aldenta?d=50" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aldenta.com/2009/02/17/stop-mailing-me-phone-books/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.aldenta.com/2009/02/17/stop-mailing-me-phone-books/</feedburner:origLink></item>
		<item>
		<title>Happy 25th Birthday Macintosh!</title>
		<link>http://feedproxy.google.com/~r/Aldenta/~3/3XCPNfQBpWc/</link>
		<comments>http://www.aldenta.com/2009/01/24/happy-25th-birthday-macintosh/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 23:38:25 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.aldenta.com/?p=112</guid>
		<description><![CDATA[Marcin Wichary]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm3.static.flickr.com/2077/2179402603_bd8f1fcbe6.jpg" alt="Apple Macintosh" /><br />
<small><a href="http://www.flickr.com/photos/mwichary/2179402603/">Marcin Wichary</a></small></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/Aldenta?a=UxIa52iy"><img src="http://feeds.feedburner.com/~f/Aldenta?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/Aldenta?a=NEDvcfym"><img src="http://feeds.feedburner.com/~f/Aldenta?d=2802" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/Aldenta?a=tErBgkVp"><img src="http://feeds.feedburner.com/~f/Aldenta?i=tErBgkVp" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/Aldenta?a=wDyOPPuT"><img src="http://feeds.feedburner.com/~f/Aldenta?d=50" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aldenta.com/2009/01/24/happy-25th-birthday-macintosh/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.aldenta.com/2009/01/24/happy-25th-birthday-macintosh/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.303 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-07-30 08:17:54 -->
