<?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>Nine More Minutes &#187; theme</title>
	<atom:link href="http://www.ninemoreminutes.com/tag/theme/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ninemoreminutes.com</link>
	<description>Software Design and Consulting</description>
	<lastBuildDate>Sat, 08 Oct 2011 19:57:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Customizing the Default WordPress Theme</title>
		<link>http://www.ninemoreminutes.com/2008/12/customizing-the-default-wordpress-theme/</link>
		<comments>http://www.ninemoreminutes.com/2008/12/customizing-the-default-wordpress-theme/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 23:00:53 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[kubrick]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.ninemoreminutes.com/?p=14</guid>
		<description><![CDATA[To get the new Nine More Minutes site going, I&#8217;d considered various options, trying to find the simplest one that would give me a way of displaying a few pages about the company and the work I do. I&#8217;d looked at doing a simple static site (in strict XHTML, of course) or even using Python + Django [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ninemoreminutes.com/wp-content/uploads/2008/12/wp29mm.gif"><img class="alignleft size-full wp-image-100" style="margin-right: 10px" title="WP to 9MM" src="http://www.ninemoreminutes.com/wp-content/uploads/2008/12/wp29mm.gif" alt="WP to 9MM" width="197" height="158" /></a>To get the new <a title="Nine More Minutes" href="http://www.ninemoreminutes.com/" target="_self">Nine More Minutes</a> site going, I&#8217;d considered various options, trying to find the simplest one that would give me a way of displaying a few pages about the company and the work I do. I&#8217;d looked at doing a simple static site (in strict <a title="XHTML" href="http://www.w3.org/TR/xhtml1/" target="_blank">XHTML</a>, of course) or even using <a title="Python Programming Language" href="http://www.python.org/" target="_blank">Python</a> + <a title="Django" href="http://www.djangoproject.com/" target="_blank">Django</a> to build a database-driven web site to display, well, plain old pages.  </p>
<p>In spite of my general disdain towards <a title="PHP: Hypertext Processor" href="http://www.php.net/" target="_blank">PHP</a>, I realized that <a title="WordPress: Blog Tool and Publishing Platform" href="http://www.wordpress.org" target="_blank">WordPress</a> was exactly what I was looking for, and it would <a title="The Virtues of a Programmer" href="http://www.hhhh.org/wiml/virtues.html" target="_blank">save me from having to write much code</a>. Of course, it would also give me an excuse to write some posts and keep the site updated on a regular basis. But first, I needed to make a theme using my existing 9MM logo and colors.</p>
<p>I started by reading various articles on the topic, most of them describing the files required in the theme directory and how to build a theme from scratch. <a title="Building Custom WordPress Theme" href="http://www.webdesignerwall.com/tutorials/building-custom-wordpress-theme/" target="_blank">This one</a> is a really good guide, if you&#8217;re into that sort of thing. Taking the even <span style="text-decoration: line-through;">lazier</span> simpler route, I just copied the <strong>default</strong> theme folder and renamed it to <strong>9mm</strong>, and started hacking away there&#8230;<span id="more-14"></span></p>
<h3>The Code</h3>
<p>Of course just copying the theme to a new directory isn&#8217;t enough. Not that I expected it to be, but worth a shot. For the files in the <strong>default</strong> (<a title="Kubrick" href="http://binarybonsai.com/kubrick/" target="_blank">Kubrick</a>) theme, I&#8217;ve listed the changes that were required to make them into the <strong>9mm</strong> theme.</p>
<ul style="text-align: left;">
<li><strong>functions.php</strong> &#8211; <a title="PHP: Hypertext Preprocessor" href="http://www.php.net/" target="_blank">PHP</a> wasn&#8217;t happy to have functions in both the <strong>default</strong> and <strong>9mm</strong> themes with the same names. I renamed all of the kubrick* functions to ninemore* instead. I didn&#8217;t notice this same problem with other themes I&#8217;ve customized since, so it may have been related to my version of <a title="PHP: Hypertext Preprocessor" href="http://www.php.net/" target="_blank">PHP</a> or <a title="WordPress: Blog Tool and Publishing Platform" href="http://www.wordpress.org" target="_blank">WordPress</a> at the time.</li>
<li><strong>header.php</strong> &#8211; Since my header graphic would contain the blog title and caption, I didn&#8217;t need to display this text dynamically. I instead made the entire header div into a link to the blog homepage. I also modified the #page style to remove the kubrick prefix from the image file names.</li>
<li><strong>screenshot.png</strong> &#8211; I recreated this file from a screenshot of my new theme.</li>
<li><strong>style.css</strong> &#8211; I first modified the content block at the beginning of the file to reflect my new theme name and additional information.  Then I changed the colors and images for my new theme.  I also removed the extra margin around the body tag and #page div, and updated the #headerimg div height to match my own header image file dimensions.</li>
<li><strong>images/audio.jpg</strong> &#8211; I removed this file from my theme.</li>
<li><strong>images/header-img.php</strong> &#8211; Since I had no need to make a dynamically-configurable header background image, I removed this file from my theme.</li>
<li><strong>images/kubrickbg-ltr.jpg</strong> &#8211; This file would be replaced with bg-ltr.png.</li>
<li><strong>images/kubrickbg-rtl.jpg</strong> - This file would be replaced with bg-rtl.png.</li>
<li><strong>images/kubrickbgcolor.jpg</strong> - This file would be replaced with bgcolor.png.</li>
<li><strong>images/kubrickbgwide.jpg</strong> - This file would be replaced with bgwide.png.</li>
<li><strong>images/kubrickfooter.jpg</strong> - This file would be replaced with footer.png.</li>
<li><strong>images/kubrickheader.jpg</strong> - This file would be replaced with header.png.</li>
</ul>
<p>The following files required no changes:</p>
<ul>
<li><strong>404.php</strong></li>
<li><strong>archive.php</strong></li>
<li><strong>archives.php</strong></li>
<li><strong>comments-popup.php</strong></li>
<li><strong>comments.php</strong></li>
<li><strong>footer.php</strong></li>
<li><strong>image.php</strong></li>
<li><strong>index.php</strong></li>
<li><strong>links.php</strong></li>
<li><strong>page.php</strong></li>
<li><strong>rtl.css</strong></li>
<li><strong>search.php</strong></li>
<li><strong>searchform.php</strong></li>
<li><strong>sidebar.php</strong></li>
<li><strong>single.php</strong></li>
</ul>
<h3>The Design</h3>
<p>Now it was time to fire up <a title="Adobe Photoshop" href="http://www.adobe.com/products/photoshop/" target="_blank">Photoshop</a> and mock up the layout of the site, basically starting from the business card design I&#8217;d done back in April. I really liked the logo, font, colors and background image on that one, so why change it?</p>
<p><a href="http://www.ninemoreminutes.com/wp-content/uploads/2008/12/preview.jpg"><img class="alignnone size-full wp-image-53" title="Business Card" src="http://www.ninemoreminutes.com/wp-content/uploads/2008/12/preview.jpg" alt="Business Card" width="259" height="152" /></a></p>
<p>I created the mockup image below to match the dimensions of the <strong>default</strong> theme, but instead using my own logo, font, colors and background. It&#8217;s all saved with layers, using various blending options for the borders, glow and shadows, making it pretty simple to tweak if needed.</p>
<p><a href="http://www.ninemoreminutes.com/wp-content/uploads/2008/12/9mmpsd.png"><img class="alignnone size-full wp-image-98" title="9MM Mockup with Slices" src="http://www.ninemoreminutes.com/wp-content/uploads/2008/12/9mmpsd.png" alt="9MM Mockup with Slices" width="473" height="320" /></a></p>
<p>As you can also see, I sliced the mockup image into six slices, and named them to match the images files expected by the theme.  By doing it this way, I could simply do a &#8220;Save for Web&#8221; (using <a title="PNG (Portable Network Graphics)" href="http://libpng.org/pub/png/" target="_blank">PNG</a> format) into my theme folder, and have <a title="Adobe Photoshop" href="http://www.adobe.com/products/photoshop/" target="_blank">Photoshop</a> save my six image files with the right names.  From top to bottom, the six layers are named as follows:</p>
<ol>
<li>header</li>
<li>bgwide</li>
<li>bg-ltr</li>
<li>bg-rtl</li>
<li>footer</li>
<li>bgcolor</li>
</ol>
<h3>The Conclusion</h3>
<p>And that&#8217;s all it took to make this custom <a title="WordPress: Blog Tool and Publishing Platform" href="http://www.wordpress.org" target="_blank">WordPress</a> theme.  Since the original <a title="Kubrick" href="http://binarybonsai.com/kubrick/" target="_blank">Kubrick</a> theme is licensed under the <a title="GPL" href="http://www.opensource.org/licenses/gpl-license.php" target="_blank">GPL</a>, I also have to release my theme under the same license.  Since I&#8217;m not actually redistributing it or selling it, and you&#8217;re only viewing the output of it in your browser, I don&#8217;t <em>have</em> to make it available.  But I will anyways (minus my original <a title="Adobe Photoshop" href="http://www.adobe.com/products/photoshop/" target="_blank">Photoshop</a> file), since it would already be possible to grab the images and style sheet from this server.  Enjoy!</p>
<p><a href="http://www.ninemoreminutes.com/wp-content/uploads/2008/12/9mm.zip">9mm WordPress Theme (9mm.zip)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ninemoreminutes.com/2008/12/customizing-the-default-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

