<?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>Curtis Henson</title>
	
	<link>http://curtishenson.com</link>
	<description>Freelance Web Designer and Wordpress Guru</description>
	<lastBuildDate>Mon, 08 Mar 2010 18:47:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/curtishenson" /><feedburner:info uri="curtishenson" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>curtishenson</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcurtishenson" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcurtishenson" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcurtishenson" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/curtishenson" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcurtishenson" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fcurtishenson" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcurtishenson" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><item>
		<title>Edward Tufte Weighs in on WP7S</title>
		<link>http://feedproxy.google.com/~r/curtishenson/~3/uODDSxLEZnc/</link>
		<comments>http://curtishenson.com/edward-tufte-weighs-in-on-wp7s/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 18:47:25 +0000</pubDate>
		<dc:creator>Curtis Henson</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://curtishenson.com/?p=895</guid>
		<description><![CDATA[Tufte gives his thoughts on the Windows Phone 7 Series interface (There&#8217;s a name). He doesn&#8217;t seem too impressed but [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0003cy&#038;topic_id=1&#038;topic=Ask+E%2eT%2e'>Tufte gives his thoughts on the Windows Phone 7 Series interface</a> (<em>There&#8217;s a name</em>). He doesn&#8217;t seem too impressed but no one has actually <em>used</em> it yet so maybe the end result will be better, but I personally doubt it. Also the comments are worth checking out, they have some good ideas and points. </p>
<p>Some pop out points: </p>
<ul>
<li>Design at the actual scale of the final device.</li>
<li>Design for the product not the keynote.</li>
</ul>


<p>No related posts.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/curtishenson?a=uODDSxLEZnc:2hhCTyrHeYk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/curtishenson?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=uODDSxLEZnc:2hhCTyrHeYk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=uODDSxLEZnc:2hhCTyrHeYk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=uODDSxLEZnc:2hhCTyrHeYk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=uODDSxLEZnc:2hhCTyrHeYk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/curtishenson/~4/uODDSxLEZnc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://curtishenson.com/edward-tufte-weighs-in-on-wp7s/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://curtishenson.com/edward-tufte-weighs-in-on-wp7s/</feedburner:origLink></item>
		<item>
		<title>HipHop for PHP – Off the hizzy</title>
		<link>http://feedproxy.google.com/~r/curtishenson/~3/HCf15P7xyx4/</link>
		<comments>http://curtishenson.com/hiphop-for-php-off-the-hizzy/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 19:34:26 +0000</pubDate>
		<dc:creator>Curtis Henson</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://curtishenson.com/?p=890</guid>
		<description><![CDATA[If you haven&#8217;t heard of Facebook&#8217;s HipHop for PHP you probably don&#8217;t care. If you have heard you probably want [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t heard of Facebook&#8217;s HipHop for PHP you probably don&#8217;t care. If you have heard you probably want to know how it is actually going to help <em>you</em>. Seems to be a lot of misinformation out there about what impact HipHop will have.</p>
<p>Terry Chay wrote up <a href="http://terrychay.com/article/hiphop-for-faster-php.shtml">Faster PHP fo shizzle—HipHop for PHP</a> which does an excellent job of breaking down who HipHop will help, and who it will <strong>not</strong>. </p>


<p>No related posts.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/curtishenson?a=HCf15P7xyx4:siZWRrWyZKg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/curtishenson?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=HCf15P7xyx4:siZWRrWyZKg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=HCf15P7xyx4:siZWRrWyZKg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=HCf15P7xyx4:siZWRrWyZKg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=HCf15P7xyx4:siZWRrWyZKg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/curtishenson/~4/HCf15P7xyx4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://curtishenson.com/hiphop-for-php-off-the-hizzy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://curtishenson.com/hiphop-for-php-off-the-hizzy/</feedburner:origLink></item>
		<item>
		<title>WordPress 2.9 Thumbnails</title>
		<link>http://feedproxy.google.com/~r/curtishenson/~3/avebRrs2sr0/</link>
		<comments>http://curtishenson.com/wordpress-2-9-thumbnails/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 23:14:36 +0000</pubDate>
		<dc:creator>Curtis Henson</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://curtishenson.com/?p=821</guid>
		<description><![CDATA[So I finally got around to using the new built in thumbnails in WordPress. Was looking around for some info [...]


Related posts:<ol><li><a href='http://curtishenson.com/press75-releases-two-new-plugins/' rel='bookmark' title='Permanent Link: Press75 Releases Two New Plugins'>Press75 Releases Two New Plugins</a> <small>here are a few things that have been the realm...</small></li>
<li><a href='http://curtishenson.com/css-preprocessors/' rel='bookmark' title='Permanent Link: CSS Preprocessors'>CSS Preprocessors</a> <small>I&#8217;ve recently had my eyes opened to CSS preprocessors and...</small></li>
<li><a href='http://curtishenson.com/creating-a-chart-on-your-wordpress-archives-page/' rel='bookmark' title='Permanent Link: Creating a Chart on Your WordPress Archives Page'>Creating a Chart on Your WordPress Archives Page</a> <small>One part of WordPress that I've never been overly impressed...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>So I finally got around to using the new built in thumbnails in WordPress. Was looking around for some info when I found Matt Brett&#8217;s post <a href="http://mattbrett.com/2010/01/bulletproof-post-thumbnails-in-wordpress-2-9/">Bulletproof Post Thumbnails in WordPress 2.9</a> which lays down the code pretty simply.</p>
<p>The basics go like this. Check out <a href="http://mattbrett.com/2010/01/bulletproof-post-thumbnails-in-wordpress-2-9/">Matt&#8217;s post</a> and also visit <a href="http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/">Mark Jaquith&#8217;s</a> and <a href="http://www.kremalicious.com/2009/12/wordpress-post-thumbnails/">Kremalicious</a>&#8216; posts on the subject for more info.</p>
<p><script src="http://gist.github.com/288252.js?file=WordPressPostThumbnails.php"></script></p>


<p>Related posts:<ol><li><a href='http://curtishenson.com/press75-releases-two-new-plugins/' rel='bookmark' title='Permanent Link: Press75 Releases Two New Plugins'>Press75 Releases Two New Plugins</a> <small>here are a few things that have been the realm...</small></li>
<li><a href='http://curtishenson.com/css-preprocessors/' rel='bookmark' title='Permanent Link: CSS Preprocessors'>CSS Preprocessors</a> <small>I&#8217;ve recently had my eyes opened to CSS preprocessors and...</small></li>
<li><a href='http://curtishenson.com/creating-a-chart-on-your-wordpress-archives-page/' rel='bookmark' title='Permanent Link: Creating a Chart on Your WordPress Archives Page'>Creating a Chart on Your WordPress Archives Page</a> <small>One part of WordPress that I've never been overly impressed...</small></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/curtishenson?a=avebRrs2sr0:3aFNJo0pigo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/curtishenson?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=avebRrs2sr0:3aFNJo0pigo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=avebRrs2sr0:3aFNJo0pigo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=avebRrs2sr0:3aFNJo0pigo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=avebRrs2sr0:3aFNJo0pigo:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/curtishenson/~4/avebRrs2sr0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://curtishenson.com/wordpress-2-9-thumbnails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://curtishenson.com/wordpress-2-9-thumbnails/</feedburner:origLink></item>
		<item>
		<title>Vintage Ad Browser</title>
		<link>http://feedproxy.google.com/~r/curtishenson/~3/e5GdZtATYYQ/</link>
		<comments>http://curtishenson.com/vintage-ad-browser/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 21:34:33 +0000</pubDate>
		<dc:creator>Curtis Henson</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://curtishenson.com/?p=806</guid>
		<description><![CDATA[
I love vintage ads! Nothing is more inspiring to me than some 1920&#8217;s typography, and nothing is more hilarious than [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img src="http://curtishenson.com/wp-content/uploads/2010/01/Picture-1.png" alt="" title="Hogs" width="510" height="176" class="alignnone size-full wp-image-808" /></p>
<p>I love vintage ads! Nothing is more inspiring to me than some 1920&#8217;s typography, and nothing is more hilarious than 1960&#8217;s car ads. So the <a href="http://www.vintageadbrowser.com/">Vintage Ad Browser</a> is just about the greatest thing on the internet to me. Definitely take some time out to browse it and bookmark it, you will need this for inspiration one day.</p>
<p>Check out the <a href="http://www.vintageadbrowser.com/">Vintage Ad Browser</a></p>


<p>No related posts.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/curtishenson?a=e5GdZtATYYQ:fyFZPOjKcNI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/curtishenson?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=e5GdZtATYYQ:fyFZPOjKcNI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=e5GdZtATYYQ:fyFZPOjKcNI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=e5GdZtATYYQ:fyFZPOjKcNI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=e5GdZtATYYQ:fyFZPOjKcNI:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/curtishenson/~4/e5GdZtATYYQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://curtishenson.com/vintage-ad-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://curtishenson.com/vintage-ad-browser/</feedburner:origLink></item>
		<item>
		<title>CSS Preprocessors</title>
		<link>http://feedproxy.google.com/~r/curtishenson/~3/WGjuZF8GsRs/</link>
		<comments>http://curtishenson.com/css-preprocessors/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 22:14:09 +0000</pubDate>
		<dc:creator>Curtis Henson</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://curtishenson.com/?p=782</guid>
		<description><![CDATA[I&#8217;ve recently had my eyes opened to CSS preprocessors and been looking for an excuse to use one. While I [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently had my eyes opened to CSS preprocessors and been looking for an excuse to use one. While I haven&#8217;t had a need for one quite yet I&#8217;ve been educating myself on them. Nathan Borror recently posted the article &#8220;<a href="http://nathanborror.com/posts/2009/nov/30/sass-isnt-me/">Sass isn&#8217;t for me</a>&#8221; about this very subject. While I agree with most of the points, the <strong>real gold here is in the discussion of the article</strong>. If you want some opinions or info about CSS preprocessors, the way they work, or the way people think <em>they should work</em>, <a href="http://nathanborror.com/posts/2009/nov/30/sass-isnt-me/">read the comments</a>.</p>
<h3>What do I think</h3>
<p>Honestly I don&#8217;t have a fixed position on the issue of <a href="http://sass-lang.com/">Sass</a>, <a href="http://lesscss.org/">LessCss</a>, or preprocessors in general yet since I haven&#8217;t used them. However I know what <em>I want</em> in a preprocessor. The first and biggest issue to me is syntax, I write CSS like Nathan, everything on one line. I know CSS, I have years of experience with it&#8217;s syntax, I don&#8217;t <em>want</em> to learn a new syntax. That counts Sass out, for now (a new syntax is being developed for Sass that is more tightly coupled to CSS). </p>
<p>The second is features. Ultimately this will be the deciding factor for any project. Right now <a href="http://sass-lang.com/">Sass</a> and <a href="http://lesscss.org/">LessCSS</a> look similar, although <a href="http://wiki.github.com/chriseppstein/compass">Compass</a> and Sass look incredibly powerful together. </p>
<p>Most of us have tons of experience with CSS and are reluctant to move to anything new (remember what it took to get you away from table based layouts?) regardless of CSS shortcomings. But nonetheless CSS does have a few large shortcomings that need to be addressed and it looks like preprocessors are going to be the answer for right now.</p>


<p>No related posts.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/curtishenson?a=WGjuZF8GsRs:DGgockd6IKM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/curtishenson?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=WGjuZF8GsRs:DGgockd6IKM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=WGjuZF8GsRs:DGgockd6IKM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=WGjuZF8GsRs:DGgockd6IKM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=WGjuZF8GsRs:DGgockd6IKM:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/curtishenson/~4/WGjuZF8GsRs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://curtishenson.com/css-preprocessors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://curtishenson.com/css-preprocessors/</feedburner:origLink></item>
		<item>
		<title>Creating a Chart on Your WordPress Archives Page</title>
		<link>http://feedproxy.google.com/~r/curtishenson/~3/CD8nYP5ubbA/</link>
		<comments>http://curtishenson.com/creating-a-chart-on-your-wordpress-archives-page/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 16:00:29 +0000</pubDate>
		<dc:creator>Curtis Henson</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://curtishenson.com/?p=638</guid>
		<description><![CDATA[One part of WordPress that I've never been overly impressed with is archives. This isn't so much a WordPress problem as it an archive problem, archives are inherently boring. As a result of this revelation I've spent some time thinking up new ways to present the information. My latest idea was adding charts to represent some of the data from the archives.


Related posts:<ol><li><a href='http://curtishenson.com/dry-wordpress-theme-coding/' rel='bookmark' title='Permanent Link: DRY WordPress Theme Coding'>DRY WordPress Theme Coding</a> <small>Don't Repeat Yourself is the rule, the name of the...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>One part of WordPress that I&#8217;ve never been overly impressed with is archives. This isn&#8217;t so much a WordPress problem as it an archive problem, archives are inherently boring. As a result of this revelation I&#8217;ve spent some time thinking up new ways to present the information. My latest idea was adding charts to represent some of the data from the archives. This is a fairly simple function to output the info and style it as a chart. </p>
<p><em>If you want to use a flash or javascript chart, scroll to the bottom for a different function.</em></p>
<p><img src="http://curtishenson.com/wp-content/uploads/2009/07/chart.jpg" alt="chart" title="chart" class="alignnone size-full wp-image-650" /></p>
<h3>The Chart</h3>
<p>After looking for a lightweight flash or javascript charting solution, I decided for an archives page just plain CSS charts would be the way to go at first. So the output we are going for is something like this:</p>
<pre name="code" class="html">
&lt;dl class=&quot;barGraph 2008&quot;&gt;
	&lt;dt style=&quot;&quot; class=&quot;label&quot;&gt;&lt;a href=&quot;&quot;&gt;Jun&lt;/a&gt;&lt;/dt&gt;
	&lt;dd title=&quot;Jun&quot; style=&quot;height: 200px;&quot; class=&quot;bar Jun&quot;&gt;6&lt;/dd&gt;

	&lt;dt style=&quot;left: 55px;&quot; class=&quot;label&quot;&gt;&lt;a href=&quot;&quot;&gt;Jul&lt;/a&gt;&lt;/dt&gt;
	&lt;dd title=&quot;Jul&quot; style=&quot;height: 66.6667px; left: 55px;&quot; class=&quot;bar Jul&quot;&gt;2&lt;/dd&gt;

	&lt;dt style=&quot;left: 110px;&quot; class=&quot;label&quot;&gt;&lt;a href=&quot;&quot;&gt;Aug&lt;/a&gt;&lt;/dt&gt;
	&lt;dd title=&quot;Aug&quot; style=&quot;height: 100px; left: 110px;&quot; class=&quot;bar Aug&quot;&gt;3&lt;/dd&gt;

	&lt;dt style=&quot;left: 165px;&quot; class=&quot;label&quot;&gt;&lt;a href=&quot;&quot;&gt;Sep&lt;/a&gt;&lt;/dt&gt;
	&lt;dd title=&quot;Sep&quot; style=&quot;height: 133.333px; left: 165px;&quot; class=&quot;bar Sep&quot;&gt;4&lt;/dd&gt;

	&lt;dt style=&quot;left: 220px;&quot; class=&quot;label&quot;&gt;&lt;a href=&quot;&quot;&gt;Oct&lt;/a&gt;&lt;/dt&gt;
	&lt;dd title=&quot;Oct&quot; style=&quot;height: 166.667px; left: 220px;&quot; class=&quot;bar Oct&quot;&gt;5&lt;/dd&gt;

	&lt;dt style=&quot;left: 275px;&quot; class=&quot;label&quot;&gt;&lt;a href=&quot;&quot;&gt;Nov&lt;/a&gt;&lt;/dt&gt;
	&lt;dd title=&quot;Nov&quot; style=&quot;height: 100px; left: 275px;&quot; class=&quot;bar Nov&quot;&gt;3&lt;/dd&gt;

	&lt;dt style=&quot;left: 330px;&quot; class=&quot;label&quot;&gt;&lt;a href=&quot;&quot;&gt;Dec&lt;/a&gt;&lt;/dt&gt;
	&lt;dd title=&quot;Dec&quot; style=&quot;height: 66.6667px; left: 330px;&quot; class=&quot;bar Dec&quot;&gt;2&lt;/dd&gt;
&lt;/dl&gt;
</pre>
<h3>The Code</h3>
<p>The code in the function is essentially a Frankenstein of the wp_get_archives function from the WordPress core, and this <a href="http://www.terrill.ca/design/vertical_bar_graphs/">tutorial on creating vertical bar graphs</a>. It pulls the year, month and number of posts out of the database, then formats them into a list suitable for styling into a CSS chart.</p>
<pre name="code" class="php">
&lt;?php
function ch_archive_graph($args = ''){
	global $wpdb, $wp_locale;

	//template tag defaults
	$defaults = array(
		'graphYear' =&gt; '2007',
		'limit' =&gt; '13',
		'graphHeight' =&gt; '200',
		'xIncrement' =&gt; '55'
	);

	$maxHeight = 1;
	$scale = 1;

	$r = wp_parse_args( $args, $defaults );
	extract( $r, EXTR_SKIP );

	if ( '' != $limit ) {
		$limit = absint($limit + 1);
		$limit = ' LIMIT '.$limit;
	}

	$where = apply_filters('getarchives_where', &quot;WHERE post_type = 'post' AND post_status = 'publish'&quot;, $r );

	$query = &quot;SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb-&gt;posts $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC $limit&quot;;
	$key = md5($query);
	$cache = wp_cache_get( 'ch_archive_graph' , 'general');

	$output = '&lt;dl class=&quot;barGraph '.$graphYear.'&quot;&gt;';

	if ( !isset( $cache[ $key ] ) ) {
		$arcresults = $wpdb-&gt;get_results($query);
		$cache[ $key ] = $arcresults;
		wp_cache_add( 'ch_archive_graph', $cache, 'general' );
	} else {
		$arcresults = $cache[ $key ];
	}
	if ( $arcresults ) {

		//Loop through to find the highest number of posts
		foreach ( (array) $arcresults as $arcresult ) {
			//number of posts in a month
			$total = $arcresult-&gt;posts;
			if($maxHeight &lt; $total) $maxHeight = $total;
		}

		//Reverse the months
		$arcresults = array_reverse($arcresults);
		foreach ( (array) $arcresults as $arcresult ) {
			//Limit to one year
			if($arcresult-&gt;year == $graphYear){
				//Get month name, then appreviate, delete the second line if you want full month names
				$month = sprintf(__('%1$s'), $wp_locale-&gt;get_month($arcresult-&gt;month));
				$month = sprintf(__('%1$s'), $wp_locale-&gt;get_month_abbrev($month));
				//Get archive link
				$url = get_month_link( $arcresult-&gt;year, $arcresult-&gt;month );
				//Number of posts in the month
				$num_posts = $arcresult-&gt;posts;

				//Determine the scale and the height of the bar
				$scale = $graphHeight / $maxHeight;
				$height = ($arcresult-&gt;posts * $scale);

				//Put it all together
				$output .= &quot;&lt;dt class='label' style='left: &quot;.$xOffset.&quot;px;'&gt;&lt;a href=&quot;.$url.&quot;&gt;&quot;.$month.&quot;&lt;/a&gt;&lt;/dt&gt;&quot;;
				$output .= &quot;&lt;dd class='bar &quot;.$month.&quot;' style='height: &quot;.$height.&quot;px; left: &quot;.$xOffset.&quot;px;' title=&quot;.$month.&quot;&gt;&quot;.$num_posts.&quot;&lt;/dd&gt;&quot;;

				//Increase the offset for the next bar
				$xOffset = $xOffset + $xIncrement;
			}
		}
	}	

	$output .= &quot;&lt;/dl&gt;&quot;;
	echo $output;

}
</pre>
<h3>Styling the Chart with CSS </h3>
<p>Styling the chart is made easier by the definition list.</p>
<pre name="code" class="css">
.barGraph {
	height: 200px;
	margin: 0;
	padding: 0;
	position: relative;
	}

.barGraph dt {
	bottom: 0;
	list-style:none;
	margin: 0;
	padding: 0;
	position: absolute;
	text-align: center;
	width: 54px;
	}

.barGraph dd {
	border: 1px solid #005559;
	bottom: 0;
	list-style:none;
	margin: 0 0 1.5em 0;
	padding: 0;
	position: absolute;
	text-align: center;
	width: 50px;
	background-color: #00868B;
	border-right: 5px solid #005559;
	color: #fff;
	font-weight: bold;
	}

	.barGraph dd:hover {
		border: 1px solid #FA8000;
		background-color: #F5BA52;
		border-right: 5px solid #FA8000;
		color: #000;
		}
</pre>
<h3>How to use the Graph</h3>
<p>The function works just like any other template tag. Add the above function to your functions.php file and the CSS to style.css. Then call the chart in your template like so: <code>&lt;?php ch_archive_graph(); ?></code></p>
<p>The template tag also includes a few options to make customizing it easier:</p>
<ul>
<li>&#8216;<code>graphYear</code>&#8216;   this is the year of the archive you want to display</li>
<li>&#8216;<code>xIncrement</code>&#8216;   this is the width of the bars in the chart</li>
<li>&#8216;<code>graphHeight</code>&#8216;  this is the height in pixels of the chart</li>
<li>&#8216;<code>limit</code>&#8216;    this is number of posts you want to display</li>
</ul>
<p>Example:<br />
<code>&lt;?php ch_archive_graph('graphYear=2007&#038;xIncrement=40&#038;graphHeight=400&#038;limit=6'); ?></code></p>
<h3>Bonus: For Javascript Charts</h3>
<p>If you need the output for a javascript based chart, you only need to alter things a bit to get a javascript array or months and number of posts, then plug them into whatever charting you want to use.</p>
<pre name="code" class="php">
function ch_count_months_js_output($args = ''){
	global $wpdb, $wp_locale;

	$defaults = array(
		'limit' =&gt; '',
		'before' =&gt; ''
	);

	$r = wp_parse_args( $args, $defaults );
	extract( $r, EXTR_SKIP );


	$where = apply_filters('getarchives_where', &quot;WHERE post_type = 'post' AND post_status = 'publish'&quot;, $r );
	$join = apply_filters('getarchives_join', &quot;&quot;, $r);

	$query = &quot;SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb-&gt;posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC $limit&quot;;
	$key = md5($query);
	$cache = wp_cache_get( 'ch_count_months_js_output' , 'general');

	if ( !isset( $cache[ $key ] ) ) {
		$arcresults = $wpdb-&gt;get_results($query);
		$cache[ $key ] = $arcresults;
		wp_cache_add( 'ch_count_months_js_output', $cache, 'general' );
	} else {
		$arcresults = $cache[ $key ];
	}
	if ( $arcresults ) {
		$arcresults = array_reverse($arcresults);
		$posts = array();
		$months = array();
		foreach ( (array) $arcresults as $arcresult ) {
			$month = sprintf(__('%1$s'), $wp_locale-&gt;get_month($arcresult-&gt;month));
			array_push($months, $month);
			array_push($posts, $arcresult-&gt;posts);
		}
	}	
	print_r($months);
	print_r($posts); 

	echo '&lt;p type=&quot;text/javascript&quot;&gt;'; 
	echo 'var months = [&quot;', join($months,'&quot;,&quot;'), '&quot;];'; 
	echo 'var posts = [', join($posts,','), ']';
	echo '&lt;/p&gt;';
}
</pre>
<blockquote><p>Let me know if you use it or improve it!</p></blockquote>


<p>Related posts:<ol><li><a href='http://curtishenson.com/dry-wordpress-theme-coding/' rel='bookmark' title='Permanent Link: DRY WordPress Theme Coding'>DRY WordPress Theme Coding</a> <small>Don't Repeat Yourself is the rule, the name of the...</small></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/curtishenson?a=CD8nYP5ubbA:2H-FmVkAaCk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/curtishenson?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=CD8nYP5ubbA:2H-FmVkAaCk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=CD8nYP5ubbA:2H-FmVkAaCk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=CD8nYP5ubbA:2H-FmVkAaCk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=CD8nYP5ubbA:2H-FmVkAaCk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/curtishenson/~4/CD8nYP5ubbA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://curtishenson.com/creating-a-chart-on-your-wordpress-archives-page/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://curtishenson.com/creating-a-chart-on-your-wordpress-archives-page/</feedburner:origLink></item>
		<item>
		<title>Tender Quietly Adds Killer Little Feature</title>
		<link>http://feedproxy.google.com/~r/curtishenson/~3/hrbgufYyLDo/</link>
		<comments>http://curtishenson.com/tender-quietly-adds-killer-little-feature/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 23:07:30 +0000</pubDate>
		<dc:creator>Curtis Henson</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[users]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://curtishenson.com/?p=618</guid>
		<description><![CDATA[Tender just rolled out a new javascript widget which allows you to insert a form into your site which will [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tenderapp.com/">Tender</a> just rolled out a new javascript widget which allows you to insert a form into your site which will post straight to Tender.  The widget even provides links to documentation, and the creation of a user account for the person.  All this without the user having to leave your site, I&#8217;ll be integrating it here soon.  So right now you probably have two questions: <strong>What is Tender?</strong> and <strong>Why Do I Care?</strong></p>
<h4>What is Tender?</h4>
<p>It&#8217;s a support web app, I know sounds boring, and it is to be honest. But some of us have to deal with supporting things. <a href="http://tenderapp.com/">Tender</a> makes this incredibly easy and painless. <img src="http://curtishenson.com/wp-content/uploads/2009/06/tender_widget.jpg" alt="tender_widget" title="tender_widget" width="470" height="426" class="alignright size-full wp-image-620" /> Tender has some features which set it apart for me. Numeral uno is I can manage support requests from email, I hardly ever have to actually log into the website.  Second is the integration with <a href="http://lighthouseapp.com">Lighthouse</a>, my ticket tracking app of choice.  When I first released Checkmate I encouraged people to post tickets to <a href="http://curtishenson.lighthouseapp.com">my lighthouse</a>, it was a massive failure.  However <a href="https://curtishenson.tenderapp.com/">my Tender</a> has been a success and has made responding to support requests much less painful.</p>
<h4>Why Do I Care?</h4>
<p>If you don&#8217;t support any software or services you don&#8217;t care, you shouldn&#8217;t care, and you should be happy you don&#8217;t deal with it. If you do, OR you <strong>SHOULD</strong> be supporting something(<em>*cough* your WordPress themes *cough*</em>) then you should care. Tender is an efficient, user friendly way to offer quality support. And this new widget is just an example of their commitment to making things easy for the users, who are the most important part of your software/service.</p>


<p>No related posts.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/curtishenson?a=hrbgufYyLDo:YIy4AL2xQWg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/curtishenson?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=hrbgufYyLDo:YIy4AL2xQWg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=hrbgufYyLDo:YIy4AL2xQWg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=hrbgufYyLDo:YIy4AL2xQWg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=hrbgufYyLDo:YIy4AL2xQWg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/curtishenson/~4/hrbgufYyLDo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://curtishenson.com/tender-quietly-adds-killer-little-feature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://curtishenson.com/tender-quietly-adds-killer-little-feature/</feedburner:origLink></item>
		<item>
		<title>Quick Tip: Delay Page Loading with jQuery</title>
		<link>http://feedproxy.google.com/~r/curtishenson/~3/XocC2fPOfPQ/</link>
		<comments>http://curtishenson.com/quick-tip-delay-page-loading-with-jquery/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 01:15:07 +0000</pubDate>
		<dc:creator>Curtis Henson</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://curtishenson.com/?p=521</guid>
		<description><![CDATA[On a site I recently worked on I wanted to have an animation before the next page loaded. What I wanted to happen was: user clicks a link, animation plays out, page is loaded normally. It is a nice little effect, but this is probably a trick you want to use sparingly...please...use it sparingly.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>On a site I recently worked on I wanted to have an animation before the next page loaded. What I wanted to happen was: user clicks a link, animation plays out, page is loaded normally. It is a nice little effect, but this is probably a trick you want to use sparingly&#8230;please&#8230;use it sparingly.</p>
<p>This uses the <a href="http://www.evanbot.com/article/jquery-delay-plugin/4">delay</a>, and <a href="http://gsgd.co.uk/sandbox/jquery/easing/">easing</a> plugins for jquery. The below example includes the animation just as an example.</p>
<pre name="code" class="js">
$('#link').click(function(){
        // Get the url of the link
		var toLoad = $(this).attr('href');

			// Do some stuff
			$(this).animate({
				marginRight: '50px',
				marginLeft: '-175px'
			}, 300, 'easeOutSine').animate({
				marginRight: '-38px',
				marginLeft: '-120px'
			}, 500, 'easeOutBounce');
			// Stop doing stuff

        // Wait 700ms before loading the url
		$(this).delay(700, function(){
			window.location = toLoad;
		});

        // Don't let the link do its natural thing
		return false;
});
</pre>


<p>No related posts.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/curtishenson?a=XocC2fPOfPQ:6dhRbVaeS1E:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/curtishenson?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=XocC2fPOfPQ:6dhRbVaeS1E:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=XocC2fPOfPQ:6dhRbVaeS1E:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=XocC2fPOfPQ:6dhRbVaeS1E:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=XocC2fPOfPQ:6dhRbVaeS1E:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/curtishenson/~4/XocC2fPOfPQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://curtishenson.com/quick-tip-delay-page-loading-with-jquery/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://curtishenson.com/quick-tip-delay-page-loading-with-jquery/</feedburner:origLink></item>
		<item>
		<title>Press75 Releases Two New Plugins</title>
		<link>http://feedproxy.google.com/~r/curtishenson/~3/v2E8hDDqZNw/</link>
		<comments>http://curtishenson.com/press75-releases-two-new-plugins/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 22:27:07 +0000</pubDate>
		<dc:creator>Curtis Henson</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Curtis Henson]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://curtishenson.com/?p=542</guid>
		<description><![CDATA[here are a few things that have been the realm of premium themes and some rare free themes: <strong>post thumbnails</strong>, and <strong>easy video embedding</strong>(<em>that doesn't suck</em>). Press75 just released two simple yet powerful and incredibly useful plugins.


Related posts:<ol><li><a href='http://curtishenson.com/wordpress-2-9-thumbnails/' rel='bookmark' title='Permanent Link: WordPress 2.9 Thumbnails'>WordPress 2.9 Thumbnails</a> <small>So I finally got around to using the new built...</small></li>
<li><a href='http://curtishenson.com/dry-wordpress-theme-coding/' rel='bookmark' title='Permanent Link: DRY WordPress Theme Coding'>DRY WordPress Theme Coding</a> <small>Don't Repeat Yourself is the rule, the name of the...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="span-24">
<p>There are a few things that have been the realm of premium themes and some rare free themes: <strong>post thumbnails</strong>, and <strong>easy video embedding</strong>(<em>that doesn&#8217;t suck</em>). Press75 just released two simple yet powerful and incredibly useful plugins: <a href="http://www.press75.com/the-simple-post-thumbnails-wordpress-plugin/">Simple Post Thumbnails</a> and <a href="http://www.press75.com/the-simple-video-embedder-wordpress-plugin/">Simple Video Encoder</a>. <a href="http://www.press75.com/category/blog/">Go check them out</a>, and let Jason know how awesome they are. </p>
</div>
<div class="span-12">
<h4>Simple Post Thumbnails</h4>
<p>Easily add thumbnail capability to your theme. Previously most people used <a href="http://code.google.com/p/timthumb/">timthumb</a>, but Simple Post Thumbnails is a bit cleaner. The killer feature is the ability to upload from a URL to your own server.</p>
<blockquote><p>With the Simple Post Thumbnails plugin, adding thumbnail images to your posts is as easy as uploading any image (no editing required) and clicking the Update Post button. Upon upload, the plugin will re-size and crop the selected image according to whatever parameters you specify within the plugin configuration. To view this process in action, check out the Simple Post Thumbnails <a href="http://www.press75.com/docs/simple-post-thumbnails/simple-post-thumbnails.mp4">screencast</a>.</p></blockquote>
</div>
<div class="span-12 last">
<a href="http://www.press75.com/the-simple-post-thumbnails-wordpress-plugin/"><img src="http://curtishenson.com/wp-content/uploads/2009/04/thumbs.jpg" alt="thumbs" title="thumbs" width="470" height="288" class="alignnone size-full wp-image-549" /></a>
</div>
<div class="span-12">
<h4>Simple Video Encoder</h4>
<p>There are a few video embed plugins for WordPress, but I don&#8217;t like most of them, they are heavy weighted and often add unnecessary headaches for theme developers and users. The <a href="http://www.press75.com/the-simple-video-embedder-wordpress-plugin/">Simple Video Encoder</a> is a simple and effective way to add video embedding to your theme.  </p>
<blockquote><p>With the Simple Video Embedder plugin, adding video to your post is as easy as pasting the URL for the video you want to add within a field, and then click submit. You can even provide simple width and height parameters to size your video to match your theme. Currently, this URL embed method works perfectly with several services including Vimeo.com, YouTube.com, MetaCafe.com, Revver.com, Google Video and Seesmic.com. Or, of you want to host your own video, the plugin is also compatible with FLV (Flash Video) and Quicktime formats.</p></blockquote>
</div>
<div class="span-12 last">
<a href="http://www.press75.com/the-simple-video-embedder-wordpress-plugin/"><img src="http://curtishenson.com/wp-content/uploads/2009/04/videoembedder.jpg" alt="videoembedder" title="videoembedder" width="470" height="472" class="alignnone size-full wp-image-550" /></a>
</div>


<p>Related posts:<ol><li><a href='http://curtishenson.com/wordpress-2-9-thumbnails/' rel='bookmark' title='Permanent Link: WordPress 2.9 Thumbnails'>WordPress 2.9 Thumbnails</a> <small>So I finally got around to using the new built...</small></li>
<li><a href='http://curtishenson.com/dry-wordpress-theme-coding/' rel='bookmark' title='Permanent Link: DRY WordPress Theme Coding'>DRY WordPress Theme Coding</a> <small>Don't Repeat Yourself is the rule, the name of the...</small></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/curtishenson?a=v2E8hDDqZNw:a_yWE_y0q8w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/curtishenson?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=v2E8hDDqZNw:a_yWE_y0q8w:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=v2E8hDDqZNw:a_yWE_y0q8w:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=v2E8hDDqZNw:a_yWE_y0q8w:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=v2E8hDDqZNw:a_yWE_y0q8w:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/curtishenson/~4/v2E8hDDqZNw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://curtishenson.com/press75-releases-two-new-plugins/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
<enclosure url="http://www.press75.com/docs/simple-post-thumbnails/simple-post-thumbnails.mp4" length="13632118" type="video/mp4" />
		<feedburner:origLink>http://curtishenson.com/press75-releases-two-new-plugins/</feedburner:origLink></item>
		<item>
		<title>DRY WordPress Theme Coding</title>
		<link>http://feedproxy.google.com/~r/curtishenson/~3/oSniCpOA2RQ/</link>
		<comments>http://curtishenson.com/dry-wordpress-theme-coding/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 23:33:28 +0000</pubDate>
		<dc:creator>Curtis Henson</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://curtishenson.com/?p=509</guid>
		<description><![CDATA[Don't Repeat Yourself is the rule, the name of the game, and what you should apply to just about everything you code. So what is DRY? In it's simplest form it means don't write the same code over and over again.  


Related posts:<ol><li><a href='http://curtishenson.com/creating-a-chart-on-your-wordpress-archives-page/' rel='bookmark' title='Permanent Link: Creating a Chart on Your WordPress Archives Page'>Creating a Chart on Your WordPress Archives Page</a> <small>One part of WordPress that I've never been overly impressed...</small></li>
<li><a href='http://curtishenson.com/press75-releases-two-new-plugins/' rel='bookmark' title='Permanent Link: Press75 Releases Two New Plugins'>Press75 Releases Two New Plugins</a> <small>here are a few things that have been the realm...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t Repeat Yourself is the rule, the name of the game, and what you should apply to just about everything you code. It is a simple principle which seems to be totally ignored when it comes to WordPress themes. So what is DRY? In it&#8217;s simplest form it means don&#8217;t write the same code over and over again.  </p>
<p>WordPress themes seem prone to this sort of repeating your code. I believe this mostly has to do with WordPress theme developers not being &#8220;developers&#8221; in a traditional sense, more designers who can code.  This habit of repeating code also comes from introductory tutorials and the like which have you creating templates which are mostly the same thing over and over.</p>
<p>Themes are getting more and more advanced, WordPress itself is getting more flexible. As these themes get more complex they need to be simpler. I learned this with my Checkmate theme. It was quickly getting out of hand with the numerous files, lack of organization, and changing code took entirely too long. </p>
<h3>K.I.S.S.</h3>
<p>I want to rock and roll all night, and party every day too, but I&#8217;m busy changing one line of code&#8230;in ten different template files.  That shouldn&#8217;t happen, my new goal is now to create the lightest template files I can, and be heavy on other tools. I also like to cut down on the number of templates I have.  The simpler the file structure and code the easier to change or update.</p>
<p>HTML and CSS strive to separate style from content, so you should also try to separate logic from your views.  Essentially separate your php from your html as much as possible.  This is much more apparent on really complex themes requiring more than your basic template tags.</p>
<h3>The Tools</h3>
<p>So what tools are there to help in the endeavor to not repeat ourselves? There are quite a few stupidly useful ones.</p>
<h4>Template Hierarchy</h4>
<p>The first step is understanding what files WordPress looks for at any given time. This can help you strategically use files and save yourself a lot of copying and pasting.  The best place to learn about hierarchy is the <a href="http://codex.wordpress.org/Template_Hierarchy">WordPress Codex Template Hierarchy</a> page.</p>
<p>A quick example of how I use the hierarchy is by using archive.php to display category, tag and author pages. Often these pages are the exact same with minimal changes. Using conditional statements you can serve parts of the page depending on what is requested.  <a href="http://github.com/curtishenson/checkmate/blob/bb636855d306fc1d5bc79fced9240ed7c10feb35/archive.php">Checkmate&#8217;s archive file</a> uses this type of system to dynamically display information for tags, categories, or author information.</p>
<h4>Conditional Statements</h4>
<p>After you know the template hierarchy, you&#8217;ll need to understand the use of conditional statements to make the most of your template files. I&#8217;ve written twice about conditional statements: <a href="http://curtishenson.com/wordpress-conditional-tags-write-less-code/">Write Less Code</a>, and <a href="http://curtishenson.com/complex-wordpress-conditional-tags/">Complex WordPress Conditional Tags</a>.  The WordPress codex page on <a href="http://codex.wordpress.org/Conditional_Tags">Conditional Tags</a> will explain everything in great detail.</p>
<p>Conditional tags are just ways to create powerful PHP if else statements very easily. You can use them to dynamically display select parts of a template only in certain specific circumstances.</p>
<h4>The Functions File</h4>
<p>The functions file is your friend, a powerful friend, a good friend, a wing man of sorts.  I use the functions file to call all my other goodies, allowing me to keep a nice clean structured theme folder. Pearsonified has a great article on <a href="http://www.pearsonified.com/2008/05/how-to-use-wordpress-functions.php">how to use the functions file</a>. Toxane also has a good article with some examples for <a href="http://www.flowdrops.com/wordpress/wordpress-themes-functions-php/">WordPress&#8217; function file</a>.  The function file can be used </p>
<h4>PHP Itself</h4>
<p>Some basic PHP can go a long way coupled with some of WordPress&#8217; functions. Learning to read the API and knowing the lingo can go a long way in accomplishing whatever you want.</p>
<h4>Helper Functions</h4>
<p>In the near future I&#8217;ll be releasing my <a href="http://curtishenson.com/wordpress-theme-tools-project-announcement/">WordPress Tools Project</a>, which is a bunch of functions all ready to be included into themes to help do some mundane things. But you don&#8217;t have to wait for me, make up your own, go back into old themes and abstract out some of the advanced things you do. Always using the same HTML code around a template tag? Put it into a function and make your own template tag.</p>
<p>I&#8217;ve started posting some of these functions to serve as examples: <a href="http://curtishenson.com/wordpress-navigation-helper-function-comments-and-posts/">WordPress Navigation Helper</a>, and <a href="http://curtishenson.com/dynamic-multi-level-page-menus-in-wordpress/">Dynamic Multi-Level Page Menus</a>.</p>
<h3>Some Tips</h3>
<p>Try to keep things organized, for instance put all your javascript in one folder, all your php functions in another, css in another. </p>
<p>Develop a solid framework. I find myself working off Checkmate a lot, I know it very well and know what can be stripped out immediately.  Developing a solid theme and releasing is a great way to find errors in your code, essentially it is like having thousands of testers in all sorts of different scenarios.</p>
<p>Learn from other themes.  There are a few themes that do this extremely well. <a href="http://themeshaper.com/thematic-for-wordpress/">Thematic</a> is one of my favorites.</p>


<p>Related posts:<ol><li><a href='http://curtishenson.com/creating-a-chart-on-your-wordpress-archives-page/' rel='bookmark' title='Permanent Link: Creating a Chart on Your WordPress Archives Page'>Creating a Chart on Your WordPress Archives Page</a> <small>One part of WordPress that I've never been overly impressed...</small></li>
<li><a href='http://curtishenson.com/press75-releases-two-new-plugins/' rel='bookmark' title='Permanent Link: Press75 Releases Two New Plugins'>Press75 Releases Two New Plugins</a> <small>here are a few things that have been the realm...</small></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/curtishenson?a=oSniCpOA2RQ:cKOhcIPLk7Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/curtishenson?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=oSniCpOA2RQ:cKOhcIPLk7Y:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=oSniCpOA2RQ:cKOhcIPLk7Y:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/curtishenson?a=oSniCpOA2RQ:cKOhcIPLk7Y:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/curtishenson?i=oSniCpOA2RQ:cKOhcIPLk7Y:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/curtishenson/~4/oSniCpOA2RQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://curtishenson.com/dry-wordpress-theme-coding/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://curtishenson.com/dry-wordpress-theme-coding/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.870 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-03-08 10:47:46 -->
