<?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"
	>

<channel>
	<title>Developer Tutorials' Webmaster Blog &#187; theme</title>
	<atom:link href="http://www.developertutorials.com/blog/tag/theme/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.developertutorials.com/blog</link>
	<description>Keeping webmasters up-to-date on technology.</description>
	<pubDate>Tue, 02 Sep 2008 14:59:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>WYSISYG Wordpress Theme Generators</title>
		<link>http://www.developertutorials.com/blog/wordpress-blog/wysisyg-wordpress-theme-generators-283/</link>
		<comments>http://www.developertutorials.com/blog/wordpress-blog/wysisyg-wordpress-theme-generators-283/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 00:29:34 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[generator]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/wordpress-blog/wysisyg-wordpress-theme-generators-283/</guid>
		<description><![CDATA[I&#8217;ll go out on a limb and say Wordpress is one of the finest software applications to come out this millennium.  Its put the power of the press and the ability to reach thousands (or millions) of people in the hands of the people live never before.   People from every walks of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll go out on a limb and say Wordpress is one of the finest software applications to come out this millennium.  Its put the power of the press and the ability to reach thousands (or millions) of people in the hands of the people live never before.   People from every walks of life can create powerful websites without needing to know a shred of code and it&#8217;s all open source.  That said, for people who want to dig deeper and learn a little bit more about how to create their own themes, the process can be incredibly daunting.  In took me ten posts just to cover the subject a few months back <a href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/">on this post</a>.  What Wordpress truly needs is a WYSIWYG editor to really empower people to get creative with their blogs!</p>
<p><span id="more-283"></span></p>
<p>It just so happens that are a few projects in this space already&#8230;.</p>
<p><a href='http://www.developertutorials.com/blog/wp-content/uploads/2008/06/picture-12.png'><img src="http://www.developertutorials.com/blog/wp-content/uploads/2008/06/picture-12-300x205.png" alt="" width="300" height="205" class="alignnone size-medium wp-image-286" /></a></p>
<p><a href="http://www.themedreamer.com/demos">ThemeDreamer</a> is plug-in extension for DreamWeaver that allows users to open Wordpress themes in the DreamWeaver environment and edit them as if they were normal XHTML.  It&#8217;s a truly powerful extension and only serves to make me question more why Adobe insists on ignoring this market.  Something like this should be built right in!</p>
<p><a href='http://www.developertutorials.com/blog/wp-content/uploads/2008/06/picture-41.png'><img src="http://www.developertutorials.com/blog/wp-content/uploads/2008/06/picture-41-300x133.png" alt="" width="300" height="133" class="alignnone size-medium wp-image-285" /></a></p>
<p><a href="http://www.yvoschaap.com/wpthemegen/">Yvoschaap&#8217;s WpThemeGen</a> is probably the most popular app in this space.  It allows users to create Wordpress themes online and then download them for use immediately!  If Adobe were particularly smart they&#8217;d be looking into this space too, web based graphic design apps are about to explode.  Just ask <a href="http://a.viary.com/blog/phoenix">A.viary</a></p>
<p><a href='http://www.developertutorials.com/blog/wp-content/uploads/2008/06/picture-23.png'><img src="http://www.developertutorials.com/blog/wp-content/uploads/2008/06/picture-23-300x125.png" alt="" width="300" height="125" class="alignnone size-medium wp-image-284" /></a></p>
<p><a href='http://www.developertutorials.com/blog/wp-content/uploads/2008/06/picture-62.png'><img src="http://www.developertutorials.com/blog/wp-content/uploads/2008/06/picture-62-300x133.png" alt="" width="300" height="133" class="alignnone size-medium wp-image-289" /></a></p>
<p><a href="http://www.wppal.com/">WPpal.com</a> is the competitor to Yvoschaap&#8217;s web app.  It&#8217;s somewhat versatile allowing you to upload and suggest themes for inclusion in the editor but is by no means a solution for a power user.</p>
<p>While all these solutions are great for amateurs, advanced users still dream of the day where there will  be a DreamWeaver-like application for Wordpress and other CMS&#8217;.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d283" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/wordpress-blog/wysisyg-wordpress-theme-generators-283/&amp;title=WYSISYG+Wordpress+Theme+Generators" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/wordpress-blog/wysisyg-wordpress-theme-generators-283/&amp;title=WYSISYG+Wordpress+Theme+Generators" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/wordpress-blog/wysisyg-wordpress-theme-generators-283/&amp;title=WYSISYG+Wordpress+Theme+Generators" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/wordpress-blog/wysisyg-wordpress-theme-generators-283/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Packaging a Wordpress Theme for Distribution</title>
		<link>http://www.developertutorials.com/blog/php/packaging-a-wordpress-theme-for-distribution-162/</link>
		<comments>http://www.developertutorials.com/blog/php/packaging-a-wordpress-theme-for-distribution-162/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 22:12:02 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/php/packaging-a-wordpress-theme-for-distribution-162/</guid>
		<description><![CDATA[In my ten part series &#8220;Designing and Coding a Wordpress Theme From Scratch&#8221; we made our own Wordpress theme starting with a design in Photoshop. But now that you&#8217;ve made a theme, what about releasing it to the public?


So far I&#8217;ve released two themes: Tech Blogger and Unstandard Remix).  A third, my first completely [...]]]></description>
			<content:encoded><![CDATA[<p>In my ten part series <a href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/" target="_blank" title="photoshop to xhtml to wordpress theme">&#8220;Designing and Coding a Wordpress Theme From Scratch&#8221;</a> we made our own Wordpress theme starting with a design in Photoshop. But now that you&#8217;ve made a theme, what about releasing it to the public?</p>
<p><span id="more-162"></span></p>
<p><img src="http://farm3.static.flickr.com/2001/2449394258_676eb5ea2b.jpg"></p>
<p>So far I&#8217;ve released two themes: <a href="http://goscreative.blogspot.com/2008/04/free-wordpress-theme-unstandard-remix.html" target="_blank" title="tech blogger">Tech Blogger</a> and <a href="http://goscreative.blogspot.com/2008/04/free-wordpress-theme-unstandard-remix.html" target="_blank" title="unstandard remix">Unstandard Remix</a>).  A third, my first completely original theme, is still in development but I <a href="http://goscreative.blogspot.com/2008/05/free-wordpress-theme-aqua-marina.html" target="_blank">released it early</a> for the sake of my tutorial.</p>
<p>What do you need to do when you&#8217;re releasing your first theme be it modified or bespoke?  Here&#8217;s a checklist:</p>
<ul>
<li>Include a <strong>readme.txt</strong> file.  This file should contain installation instructions, release info and any notes you want the reader to be aware of before using your theme.  It really sucks when novices are downloading themes only to be 100% confused by what they&#8217;ve downloaded. It only means that they may delete your theme and download another one that they can more easily digest.  If your goal is maximum adoption, that&#8217;s not the route you want to go.</li>
<li>Test it. Think of every scenario you can possibly remember from your own blog use.  Try to be the use, do all the things that you think no one would ever do because (rest assured) that person is out there.  Are all your links functioning?  Are all your pages displaying correctly?  If not, is your 404.php page popping up when it should?  Make sure you&#8217;ve thought of EVERY possible scenario before you release your theme.  I can&#8217;t tell you how annoying it is download a theme that you like only to spend the next few hours debugging it to make it truly functional.</li>
<p><img src="http://farm4.static.flickr.com/3107/2455545152_636cce8a80.jpg"></p>
<li>Organize it.  You want your theme to be well organized so that it doesn&#8217;t take any longer than necessary to install and use it.  Put your actual theme in a parent folder labeled &#8216;theme&#8217; so the user can just drag and drop.  Place any plug-ins or widgets your theme uses in a parent folder called &#8216;plugins&#8217; so that the user can do the same.  If you&#8217;re including .psd label those in a folder that tells the user what it is. </li>
<li>Compress it. You&#8217;ll be hard-pressed to find a file host that makes it easy to share uncompressed folders.  This is because a folder is a directory and if you upload it virtually any service online it will be treated like a directory (if accepted at all).  Compress the file as either a .zip, .sit, .gzip or .tar.gz file.  This will make the files faster to download and it will allow the user to download with one click instead of several</li>
<li>Publish it.  Where will your theme live online?  Do you want it on your own web server or do you want it hosted on at repository like <a href="http://themes.wordpress.net/" target="_blank">themes.wordpress.net</a>?  I prefer to use repositories or file hosting services like <a href="http://mediafire.com/" target="_blank">mediafire.com</a></li>
<li>Announce it.  Unless a lot of people read your bog or visit your website, there&#8217;s no way for people to know what you&#8217;ve done.  If you&#8217;ve posted your theme to a repository like <a href="http://themes.wordpress.net/" target="_blank">themes.wordpress.net</a> then the job is already done.  However, you should tell your friends and submit it to some other sites so that the world is aware.</li>
</ul>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d162" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/php/packaging-a-wordpress-theme-for-distribution-162/&amp;title=Packaging+a+Wordpress+Theme+for+Distribution" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/php/packaging-a-wordpress-theme-for-distribution-162/&amp;title=Packaging+a+Wordpress+Theme+for+Distribution" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/php/packaging-a-wordpress-theme-for-distribution-162/&amp;title=Packaging+a+Wordpress+Theme+for+Distribution" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/php/packaging-a-wordpress-theme-for-distribution-162/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Designing and Coding a Wordpress Theme From Scratch (Part 10)</title>
		<link>http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-10-160/</link>
		<comments>http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-10-160/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 21:16:50 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Photoshop]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[wordpress]]></category>

		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-10-160/</guid>
		<description><![CDATA[Going From Photoshop to XHTML to Wordpress Theme.  In this multi-part series I'll detail how to create and design a Wordpress theme in Photoshop and take it from just an idea to fully coded.
]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-3-146/">Part 3</a> - &#8220;Photoshop to XHTML in 24 Hours&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/">Part 4</a> - &#8220;Cleaning Up Your XHTML&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/javascript/designing-and-coding-a-wordpress-theme-from-scratch-part-5-149/">Part 5</a> - &#8220;Preloading Images with Javascript and CSS&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-6-151/">Part 6</a> - &#8220;Marking Up is Hard to Do&#8221; and &#8220;The Anatomy of a Wordpress Theme&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-7-153/">Part 7</a> - &#8220;Beginning with PHP for Wordpress&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-8-154/">Part 8</a> - &#8220;Putting the Press in Wordpress with PHP&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/php/designing-and-…scratch-part-9designing-and-coding-a-wordpress-theme-from-scratch-part-9-159/">Part 9</a> - &#8220;Marking Up Header.php, Footer.php and Sidebar.php&#8221;</p>
<p>So far we&#8217;ve made a ton of progress with our theme design.  We <a href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/" target="_blank" title="designing wordpress themes in photoshop">designed it</a> in Photoshop, we <a href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/" target="_blank" title="XHTML CSS to Wordpress theme">converted to XHTML</a> and then we began the somewhat tedious task of <a href="http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-7-153/" target="_blank" title="XHTML to PHP">adding PHP</a>.  Now that we&#8217;ve created index.php, header.php, footer.php and sidebar.php, we can move on to creating the rest of the theme.</p>
<p><span id="more-160"></span></p>
<p>In &#8220;The Anatomy of a Wordpress Theme&#8221; we noted that Wordpress needs <a href="http://www.wpdesigner.com/2007/03/27/wordpress-theme-checklist/" target="_blank">certain files</a> for your theme to function properly.  Here&#8217;s that list again:</p>
<ol>
<li>404 Template = 404.php</li>
<li><strike>Archive Template</strike> = <a href="http://codex.wordpress.org/Creating_an_Archive_Index" target="_blank">archive.php</a></li>
<li><strike>Archive Index Page</strike> = <a href="http://codex.wordpress.org/Creating_an_Archive_Index" title="_blank">archives.php</a></li>
<li>Comments Template = <a href="http://www.christianmontoya.com/2006/10/15/full-featured-commentsphp-template-for-wordpress/" target="_blank">comments.php</a></li>
<li><strong>Footer Template = footer.php</strong></li>
<li><strong>Header Template = header.php</strong></li>
<li>Links = links.php</li>
<li><strong>Main Template = index.php</strong></li>
<li>Page Template = page.php</li>
<li><strike>Popup Comments Template</strike> = <a href="http://codex.wordpress.org/Theme_Development" target="_blank">comments-popup.php</a></li>
<li>Post Template = single.php</li>
<li><strike>Search Form</strike> = <a href="http://codex.wordpress.org/search.php" target="_blank">searchform.php</a></li>
<li><strike>Search Template</strike> = <a href="" target="_blank">search.php</a></li>
<li><strong>Sidebar Template = sidebar.php</strong></li>
<li><strong>Stylesheet = style.css</strong></li>
</ol>
<p>As you may have noticed, the items listed in <strong>bold</strong> are the only items we&#8217;ve created in our lessons thus far and there is still a lot of work to be done!  Anything <strike>struck through</strike> is optional therefore this lesson won&#8217;t cover it but I have linked to pages where you can read about them on your own. While I can&#8217;t go into complete detail I will highlight some major points about each and then I&#8217;ll give you links to four sites that break the process down in detail and more thoroughly:</p>
<h2>single.php</h2>
<p>Single.php is the file referenced when someone clicks on the permalink for one of your posts.  Thus it is the template for displaying a single post on your blog.  On most blogs single.php an index.php are very similar except that in addition to querying <strong>&lt;? the content(); ?&gt;</strong> we also have to query the comments page. We do this just before we close the loop with:</p>
<pre>
	&lt;?php comments_template(); ?&gt;
</pre>
<p><b>page.php</b></p>
<p>Page.php is the template for any page in your theme that doesn&#8217;t have it&#8217;s own .php template or that is not a blog entry.  This is also the template for the static &#8220;Pages&#8221; that you create within the Wordpress Admin panel.  It is usually also just like index.php except that it doesn&#8217;t include <strong>the loop</strong> or <strong>the_content()</strong>.</p>
<p><b>links.php</b></p>
<p>Ignores Page content and instead displays your links using <strong>get_links_list</strong>.</p>
<h2>404.php</h2>
<p>Where you users land when they follow a bad link on your blog or click through to something that&#8217;s been removed.  <a href="http://codex.wordpress.org/Creating_an_Error_404_Page" target="blank">Codex</a> offers some advice&#8230;. </p>
<blockquote cite="http://codex.wordpress.org/Creating_an_Error_404_Page"><p>
While you work hard to make sure that every link actually goes to a specific web page on your site, there is always a chance that a link clicked will slam dunk and become a famous 404 ERROR PAGE NOT FOUND. Some errors are avoidable, you should regularly check and double check all your links. Also, if you are deleting a popular but out-of-date post, consider deleting the body of the post, and replacing it with a link referring visitors to the new page.
</p>
</blockquote>
<p>This concludes <a href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-3-146/">&#8220;Designing and Coding a Wordpress theme from Scratch&#8221;</a> .  This guide was written as a starting point and a reference guide I can always be contacted at <strong>jongos [at] gmail</strong> if you are having trouble or need advice.  Alternatively I&#8217;ve compiled a list of resources that I often reference when creating themes below.</p>
<p>In this tutorial I mentioned a theme that I was developing quite a bit.  You can download it along with the PSD used to create it <a href="http://www.developertutorials.com/blog/wp-content/uploads/2008/04/aqua-marina.zip" target="_blank">here</a>.  Keep in mind that the version you&#8217;re downloading is an early beta release.  It&#8217;s bulky, clunky, not very pretty under the covers and has a mind of it&#8217;s own so I&#8217;m dubbing it the Rosie O Donnell release.  Feel free to give me feedback on it, use it to double check your own code, or modify it to suit your needs.</p>
<p><strong>DOWNLOAD THE <a href="http://www.developertutorials.com/blog/wp-content/uploads/2008/04/aqua-marina.zip" target="_blank">AQUA MARINA</a> WORDPRESS THEME</strong></p>
<p><a href="http://goscreative.blogspot.com/2008/05/free-wordpress-theme-aqua-marina.html" target="_blank"><img src="http://farm3.static.flickr.com/2001/2449394258_676eb5ea2b_m.jpg"></a></p>
<hr />
<b>Recommended Further Reading</b></p>
<p><a target="_blank" title="understanding wordpress templates" rel="bookmark" href="http://codex.wordpress.org/">Stepping_Into_Templates</a><br />
<a target="_blank" title="html to xhtml" rel="bookmark" href="http://codex.wordpress.org/HTML_to_XHTML">HTML to XHTML</a><br />
<a target="_blank" title="create wordpress themes" rel="bookmark" href="http://www.wpdesigner.com/2007/02/19/so-you-want-to-create-wordpress-themes-huh/">So You Want To Create Wordpress Themes</a><br />
<a target="_blank" title="xhtml css to wordpress" rel="bookmark" href="http://theundersigned.net/2006/05/from-xhtmlcss-to-wordpress/">From XHTML/CSS to Wordpress</a><br />
<a href="http://www.tamba2.org.uk/wordpress/" target="_blank" title="tamba2 wordpress tutorials">Tamba2&#8217;s Guide</a><br />
<a href="http://www.wpdesigner.com/2007/08/10/how-to-slice-a-wordpress-theme/" target="_blank" title="Slicing a Wordpress Theme">Slizing a Wordpress Theme</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d160" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-10-160/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+10%29" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-10-160/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+10%29" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-10-160/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+10%29" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-10-160/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Designing and Coding a Wordpress Theme From Scratch (Part 9)</title>
		<link>http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-9-159/</link>
		<comments>http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-9-159/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 21:16:42 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Photoshop]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[Design]]></category>

		<category><![CDATA[layout]]></category>

		<category><![CDATA[photshop]]></category>

		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-9-159/</guid>
		<description><![CDATA[Going From Photoshop to XHTML to Wordpress Theme.  In this multi-part series I'll detail how to create and design a Wordpress theme in Photoshop and take it from just an idea to fully coded.
]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/">Part 2</a> - &#8220;Layout And Structure&#8221; and &#8220;Designing Wordpress Themes in Photoshop&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-3-146/">Part 3</a> - &#8220;Photoshop to XHTML in 24 Hours&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/">Part 4</a> - &#8220;Cleaning Up Your XHTML&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/javascript/designing-and-coding-a-wordpress-theme-from-scratch-part-5-149/">Part 5</a> - &#8220;Preloading Images with Javascript and CSS&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-6-151/">Part 6</a> - &#8220;Marking Up is Hard to Do&#8221; and &#8220;The Anatomy of a Wordpress Theme&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-7-153/">Part 7</a> - &#8220;Beginning with PHP for Wordpress&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-8-154/">Part 8</a> - &#8220;Putting the Press in Wordpress with PHP&#8221;</p>
<p>Because Wordpress is fundamentally a PHP system we can add a few snippets of code to make our header, footer and sidebar files dynamic. </p>
<p><b>Marking Up Header.php</b></p>
<p>Your blog header file usually contains the title of your site linked to the homepage.  In an HTML page we would simply add text or place an image and link to the homepage using &lt;a href=&#8221;"&gt;&lt;/a&gt;.  The key to making our Wordpress theme, however, is we need to make all our links relative so that the end user can install the theme and use it with their own unique site with as little fuss as possible.  It should <i>just work</i>.</p>
<p><span id="more-159"></span></p>
<p>How is this done?  We use PHP requests to request and print the blog title allowing it to be dynamically relative to the database.</p>
<p>The code for a text blog title:</p>
<pre>
	&lt;div class="blogtitle"&gt;&lt;a href="&lt;?php bloginfo('url'); ?&gt;/"&gt;
	&lt;?php bloginfo('name'); ?&gt;&lt;/a&gt;&lt;/div&gt;
</pre>
<p>The code for an image blog title:</p>
<pre>
	&lt;div class="blogtitle"&gt;&lt;a href="&lt;?php bloginfo('url'); ?&gt;/"&gt;
	&lt;img src="your/image/path.jpg" title="&lt;?php bloginfo('name'); ?&gt;" /&gt;
	&lt;/a&gt;&lt;/div&gt;
</pre>
<p>These are the only two codes we need to place in our header.php file.  In my case I needed to request other PHP documents that are meant to be displayed before the document continues: the sidebar and the center rotating headline areas. I this did using this code:</p>
<pre>
	&lt;?php require('yourphpfile.php'); ?&gt;
	&lt;?php get_sidebar(); ?&gt;
</pre>
<p>Still confused?  The image below contains a region map of my theme&#8217;s <strong>index.php</strong> as it displays in a browser.  The red region represents &#8220;header.php&#8221;, the purple region represents &#8220;center.php&#8221;, the blue region represents &#8220;sidebar.php&#8221; and the green is the post area, the code for which is contained in index.php.  </p>
<p><img src="http://farm3.static.flickr.com/2198/2454229161_0db7a57ec1.jpg"></p>
<p>Because the format of my blog is unique to my design this may not apply to your own design, I just want to make sure everything is throughly explained so that when you download my theme in <a href="http://www.developertutorials.com/blog/php/designing-and-…cratch-part-10designing-and-coding-a-wordpress-theme-from-scratch-part-10-160/" target="_blank" title="photoshop to wordpress">Part 10</a> you&#8217;ll understand how everything works.</p>
<p><b>Marking Up Footer.php</b></p>
<p>Footer.php is even easier because there&#8217;s no crucial PHP requests that need to go here to make it function.  This means it can be entirely HTML or you can add a dynamic request for the blog title like you did above.  You may want to try something like this:</p>
<pre>
	&lt;div class="footer"&gt;©2008 &lt;a href="&lt;?php bloginfo('url'); ?&gt;/"&gt;
	&lt;?php bloginfo('name'); ?&gt;&lt;/a&gt;&lt;/div&gt;
</pre>
<p>&#8230;which would simply display the copyright and year followed by the blog title.</p>
<p><b>Marking Up Sidebar.php</b></p>
<p>Sidebar.php is essentially the same in that it can contain nothing more than HTML or it can also contain PHP queries.  Here are some popular PHP queries often used in sidebar.php:</p>
<pre>
	&lt;strong&gt;Display the Blogroll:&lt;/strong&gt;
	&lt;?php get_links_list(); ?&gt;

	&lt;strong&gt;Display the pages of the site:&lt;/strong&gt;
	&lt;?php wp_list_pages('title_li=&lt;h2&gt;Pages&lt;/h2&gt;'); ?&gt;

	&lt;strong&gt;Display the site's categories:&lt;/strong&gt;
	&lt;?php wp_list_cats(); ?&gt;
</pre>
<p>I recommend reading <a href="http://codex.wordpress.org/Customizing_Your_Sidebar" target="_blank">&#8220;Customizing Your Sidebar&#8221;</a> if you&#8217;d like to explore your options a bit more.  In <a href="http://www.developertutorials.com/blog/php/designing-and-…cratch-part-10designing-and-coding-a-wordpress-theme-from-scratch-part-10-160/" target="_blank" title="photoshop to wordpress theme">Part 10</a> we&#8217;ll create the other pages of our theme and then we&#8217;ll learn all about<a href="http://www.developertutorials.com/blog/php/packaging-a-wordpress-theme-for-distribution-162/" target="_blank" title="Packaging a Wordpress Theme for Distribution">&#8220;Packaging a Wordpress Theme for Distribution&#8221;</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d159" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-9-159/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+9%29" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-9-159/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+9%29" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-9-159/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+9%29" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-9-159/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Designing and Coding a Wordpress Theme From Scratch (Part 8)</title>
		<link>http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-8-154/</link>
		<comments>http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-8-154/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 19:44:44 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[Design]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-8-154/</guid>
		<description><![CDATA[Going From Photoshop to XHTML to Wordpress Theme.  In this multi-part series I'll detail how to create and design a Wordpress theme in Photoshop and take it from just an idea to fully coded.
]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/">Part 1</a> - &#8220;Tools For The Task&#8221; and &#8220;Preparation&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/">Part 2</a> - &#8220;Layout And Structure&#8221; and &#8220;Designing Wordpress Themes in Photoshop&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-3-146/">Part 3</a> - &#8220;Photoshop to XHTML in 24 Hours&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/">Part 4</a> - &#8220;Cleaning Up Your XHTML&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/javascript/designing-and-coding-a-wordpress-theme-from-scratch-part-5-149/">Part 5</a> - &#8220;Preloading Images with Javascript and CSS&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-6-151/">Part 6</a> - &#8220;Marking Up is Hard to Do&#8221; and &#8220;The Anatomy of a Wordpress Theme&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-7-153/">Part 7</a> - &#8220;Beginning with PHP for Wordpress&#8221;</p>
<hr />
<b>Putting the Press in WordPress with PHP</b></p>
<p>Wordpress is <i>a state-of-the-art publishing platform with a focus on aesthetics, web standards, and usability</i> as the makers proudly proclaim at <a target="_blank" href="http://wordpress.org">wordpress.org</a>.  The keyword there being &#8216;publishing&#8217; and the most important part of the Wordpress publishing engine is the element that allows content to be published online easily and automatically.  This element is called the <strong>the loop</strong>.</p>
<p><span id="more-154"></span></p>
<p>While I can&#8217;t get into all the operational mechanics of how Wordpress works here, I can refer you to a page that does offer more in depth analysis (<a href="http://codex.wordpress.org" target="_blank">here</a>).  What is important to this tutorial is that the Wordpress theme we designed in Photoshop needs this PHP function (along with a few others) to correctly fetch content from the database.  Let&#8217;s examine four critical functions:</p>
<pre>
&lt;?php query_posts();?&gt;
<strong>Requests the database of content, should be placed near the top of index.php
just after the request &lt;?php get_header(); ?&gt;</strong>

&lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;
<strong>this is The Loop and it should be placed prior to
where you want your content to print</strong>

&lt;?php the_content(''); ?&gt;
<strong>Calls and prints the content of your blog according to the settings in the
admin section or php functions called before it.  This should be placed wherever
you want your blog posts to go within the &lt;div&gt; tags.</strong>

&lt;?php endif; ?&gt;
<strong>Closes the loop.</strong>
</pre>
<p>Using the code from <a href="http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-7-153/">Part 7</a> as an example:</p>
<pre>
&lt;?php get_header(); ?&gt;
&lt;?php query_posts();?&gt;

    &lt;/div&gt;

	&lt;div id="post"&gt;
	  &lt;div class="entry"&gt;
	&lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;

		&lt;div class="posts"&gt;
	&lt;?php the_excerpt(''); ?&gt;
     		&lt;/div&gt;   

	&lt;?php endif; ?&gt;
	  &lt;/div&gt;
     &lt;/div&gt;

&lt;?php get_footer(); ?&gt;
</pre>
<p>You may notice that the &lt;div&gt; tags with <strong>id</strong>  and <strong>class=&#8221;posts&#8221;</strong>elements.  These are styling anything they contain. My <strong>id=&#8221;post&#8221;</strong> is printing my photoshoped content area.  The area with <strong>id=&#8221;class&#8221;</strong> is formating how my content will be formated.  Do I want to justify text?  Do I want to use a text-transform on the first letter?  Change the color of text?  All those types of styles should be applied to this class to be passed on to the text inside the container.</p>
<p>These three lines alone are essentially all you need for index.php in your theme.  However, you&#8217;ll notice that we&#8217;re missing a few important items.  We need to call and style the posts name, permalink, and meta data individually.  This means we need to add the following:</p>
<pre>
&lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;
<strong>Requests the post tile and links to it. Place this before the post content.</strong>

&lt;?php the_time('F j, Y'); ?&gt; at &lt;?php the_time('g:i a'); ?&gt;
&lt;?php comments_popup_link('| No Comments', '| 1 Comment;', '| % Comments;'); ?&gt;
<strong>Requests various types of information related to the post.  Place this just after the previous line.</strong>

&lt;?php the_category(', ') ?&gt; &lt;?php the_tags('| Tags: ', ', ', ''); ?&gt;
&lt;?php edit_post_link('| Edit', '', ''); ?&gt;&lt;/p&gt;
<strong>This calls the footer meta information for each individual post.
Place this after the content but before you close the loop.</strong>
</pre>
<p>After placing these codes my index.php looks something like this:</p>
<pre>
&lt;?php get_header(); ?&gt;
&lt;?php query_posts("showposts=2");?&gt;

	&lt;div id="post"&gt;
	&lt;div class="entry"&gt;
		&lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;

   	&lt;span class="postname"&gt;&lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php
 the_title(); ?&gt;&lt;/a&gt;&lt;/span&gt;

    	&lt;p class="postinfo"&gt;

		&lt;?php the_time('F j, Y'); ?&gt; at &lt;?php the_time('g:i a'); ?&gt; &lt;?
php comments_popup_link('| No Comments', '| 1 Comment;', '| % Comments;'); ?&gt;&lt;/p&gt;

	&lt;div class="posts"&gt;
    		&lt;?php the_content(''); ?&gt;
         	&lt;p class="postinfo"&gt;Posted in &lt;?php the_category(', ') ?&gt; &lt;?php
 the_tags('| Tags: ', ', ', ''); ?&gt; &lt;?php edit_post_link('| Edit', '', ''); ?&gt;
&lt;/p&gt;

     	&lt;/div&gt;   

		&lt;?php endif; ?&gt;
	&lt;/div&gt;
	&lt;/div&gt;

    		&lt;?php get_footer(); ?&gt;
</pre>
<p>In Part 9 we&#8217;ll be discussing how to correctly markup header.php, footer.php and footer.php and in Part 10 we&#8217;ll create the other pages Wordpress needs.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d154" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-8-154/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+8%29" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-8-154/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+8%29" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-8-154/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+8%29" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-8-154/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Designing and Coding a Wordpress Theme From Scratch (Part 7)</title>
		<link>http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-7-153/</link>
		<comments>http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-7-153/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 13:51:45 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Photoshop]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[Design]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-7-153/</guid>
		<description><![CDATA[Going From Photoshop to XHTML to Wordpress Theme.  In this multi-part series I'll detail how to create and design a Wordpress theme in Photoshop and take it from just an idea to fully coded.
]]></description>
			<content:encoded><![CDATA[<p>This is the seventh post in series about creating Wordpress themes with your Photoshop designs.  You may want to review before we continue&#8230;.</p>
<p><a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/">Part 1</a> - &#8220;Tools For The Task&#8221; and &#8220;Preparation&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/">Part 2</a> - &#8220;Layout And Structure&#8221; and &#8220;Designing Wordpress Themes in Photoshop&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-3-146/">Part 3</a> - &#8220;Photoshop to XHTML in 24 Hours&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/">Part 4</a> - &#8220;Cleaning Up Your XHTML&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/javascript/designing-and-coding-a-wordpress-theme-from-scratch-part-5-149/">Part 5</a> - &#8220;Preloading Images with Javascript and CSS&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-6-151/">Part 6</a> - &#8220;Marking Up is Hard to Do&#8221; and &#8220;The Anatomy of a Wordpress Theme&#8221;</p>
</p>
<hr style="margin-bottom:20px; height:1px; color:#cccccc;"/>
<b>Beginning with PHP for WordPress</b></p>
<ul>
<li>First we&#8217;ll duplicate <strong>index.html</strong> and rename the copy <strong>index.php</strong>.  We&#8217;re only keeping the original .html file for reference to make sure that the finished PHP operates and looks the same.</li>
<li>Let&#8217;s open index.php in our text editor.  Right now it&#8217;s just a .html renamed .php.  Our job is to make make it true PHP.</li>
<p><span id="more-153"></span></p>
<li>Go ahead and create some more blank documents in your theme folder.  Let&#8217;s call them header.php, footer.php and sidebar.php (if you have a side bar in your theme).  We&#8217;re going to divide the HTML into the major sections and make each section it&#8217;s own PHP file to be marked up separately.</li>
<li>Cut everything that you consider the header of your document.  Make sure all tags are closed.  Below you&#8217;ll find an example of my code which is really irrelevant, your own code will look and function differently based on your unique design. Still, for the sake of a working example:</li>
<pre>
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;title&gt;The Wonderful World of Web Design!&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
&lt;link rel="stylesheet" href="style.css" type="text/css" media="screen" /&gt;
&lt;script type="text/javascript" src="scripts/preload.js"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;div id="container"&gt;
	&lt;div id="header"&gt;
    &lt;div class="description"&gt;The Blog Title&lt;/span&gt;&lt;/div&gt;
	&lt;/div&gt;
    &lt;div id="header-nav"&gt;&lt;div class="content"&gt;
    &lt;a href=""&gt;ADVERTISE&lt;/a&gt;  |
    &lt;a href=""&gt;CONTACT&lt;/a&gt;  |
    &lt;a href=""&gt;RSS&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
    &lt;div id="spacer1"&gt;&lt;/div&gt;
    &lt;div id="upper-menu"&gt;&lt;div class="navigation"&gt;
    &lt;a href=""&gt;HOME&lt;/a&gt;
    &lt;a href=""&gt;NEWS&lt;/a&gt;
    &lt;a href=""&gt;BLOG&lt;/a&gt;
    &lt;a href=""&gt;HIRE ME&lt;/a&gt;
    &lt;a href=""&gt;PORTFOLIO&lt;/a&gt;
    &lt;a href=""&gt;QUESTIONS&lt;/a&gt;
    &lt;a href=""&gt;LINKS&lt;/a&gt;
    &lt;a href=""&gt;POPULAR&lt;/a&gt;
    &lt;/div&gt;

    &lt;/div&gt;
	&lt;div id="right-top"&gt;&lt;/div&gt;

 &lt;!-- End header.php --&gt;
</pre>
<li>Paste your header information in to header.php.  Do the same for sidebar and your footer, cutting the code from index.php and pasting it in the corresponding file.</li>
<li>I use comment tags like <strong>&lt;!&#8211; End header.php &#8211;&gt;</strong> to write notes that help me remember what&#8217;s going on in my code.</li>
<li>If you do this correctly you&#8217;ll be left with a pretty sparse index.php document.  All that should be left is some That&#8217;s good because now we&#8217;re going to tell index.php where to find all the information we just moved.  We do this with PHP functions like so:</li>
<pre>
&lt;?php get_phpdocumentname(); ?&gt;
</pre>
<p>This <strong>get_</strong> function does exactly what it sounds like it goes and fetches a requested document and displays the contents of that document in the area requested.  My index.php document looked like this:</p>
<pre>
&lt;?php get_header(); ?&gt;

    &lt;/div&gt;

	&lt;div id="post"&gt;
	  &lt;div class="entry"&gt;

		&lt;div class="posts"&gt;
     		&lt;/div&gt;   

	  &lt;/div&gt;
	&lt;/div&gt;

&lt;?php get_footer(); ?&gt;
</pre>
<li>Ofcourse, for now we&#8217;ll leave the body &lt;div&gt;&#8217;s empty.  This is where our content will eventually go.
<p>You&#8217;ll notice that I have no sidebar, that&#8217;s because I call for it in the header.php document instead.  Why?  Because browsers read code from top to bottom and I want page to request the header and side bars to first before requesting the body.</p>
<p>In the next lesson we&#8217;ll start to analyze the PHP functions needed to request and display the dynamic content of a Wordpress theme.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d153" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-7-153/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+7%29" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-7-153/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+7%29" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-7-153/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+7%29" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-7-153/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Designing and Coding a Wordpress Theme From Scratch (Part 6)</title>
		<link>http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-6-151/</link>
		<comments>http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-6-151/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 12:37:31 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-6-151/</guid>
		<description><![CDATA[Going From Photoshop to XHTML to Wordpress Theme.  In this multi-part series I'll detail how to create and design a Wordpress theme in Photoshop and take it from just an idea to fully coded.
]]></description>
			<content:encoded><![CDATA[<p>This is the sixth post in series about creating Wordpress themes with your Photoshop designs.  You may want to review before we continue&#8230;.</p>
<p><a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/">Part 1</a> - &#8220;Tools For The Task&#8221; and &#8220;Preparation&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/">Part 2</a> - &#8220;Layout And Structure&#8221; and &#8220;Designing Wordpress Themes in Photoshop&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-3-146/">Part 3</a> - &#8220;Photoshop to XHTML in 24 Hours&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/">Part 4</a> - &#8220;Cleaning Up Your XHTML&#8221;<br />
<a target="_blank" href="http://www.developertutorials.com/blog/javascript/designing-and-coding-a-wordpress-theme-from-scratch-part-5-149/">Part 5</a> - &#8220;Preloading Images with Javascript and CSS&#8221;</p>
<hr style="margin-bottom:20px; height:1px; color:#cccccc;"/>
<b>Marking Up Is Hard To Do</b></p>
<p>Wikipedia defines the term markup as <i>a set of annotations to text that describe how it is to be structured, laid out, or formatted.</i>  When we say we&#8217;re going to &#8216;mark something up&#8217; it means we&#8217;re formatting the document so that it can be read correctly by machines.  Hypertext Markup Language (HTML) is the most common form.  That can be marked up to Extensible Hyper-text Markup Language (XHTML) and beyond that to PHP to become dynamic.</p>
<p>Now that we&#8217;ve got our basic html layout design we can begin the hard work the transition from HTML to PHP.</p>
<p><span id="more-151"></span></p>
<p><b>Anatomy of a WordPress Theme</b></p>
<p>Before we get ahead of ourselves let&#8217;s analyze exactly what Wordpress is expecting from a theme.  The Wordpress engine works primarily using separate PHP files for the different components of the core engine. The various parts of your theme will simply call for various parts of the core engine to display content.  This makes it easy for you to style sections individually.  It also can allow for some incredibly complex themes that are built on the Wordpress engine.  Themes like the <a target="_blank" href="http://5thirtyone.com/archives/886">The Unstandard</a> by Derek Punsalan and <a target="_blank" href="http://www.deanjrobinson.com/redoable/redoable-10-theme-for-wordpress/">Redoable</a> are great examples of how to rethink the Wordpress theme impressively.</p>
<blockquote cite="http://codex.wordpress.org/Using_Themes"><p>Fundamentally, the WordPress Theme system is a way to &#8220;skin&#8221; your weblog. Yet, it is more than just a &#8220;skin.&#8221; Skinning your site implies that only the design is changed. WordPress Themes can provide much more control over the look and presentation of the material on your website.</p>
<p>A WordPress Theme is a collection of files that work together to produce a graphical interface with an underlying unifying design for a weblog. These files are called template files. A theme modifies the way the site is displayed, without modifying the underlying software. Themes may include customized template files, image files (*.jpg, *.gif), style sheets (*.css), custom Pages, as well as any necessary code files (*.php).</p>
</blockquote>
<p>Here are the things Wordpress looks for a theme file:</p>
<ol>
<li>404 Template = 404.php</li>
<li>Archive Template = archive.php</li>
<li>Archive Index Page = archives.php</li>
<li>Comments Template = comments.php</li>
<li>Footer Template = footer.php</li>
<li>Header Template = header.php</li>
<li>Links = links.php</li>
<li>Main Template = index.php</li>
<li>Page Template = page.php</li>
<li>Popup Comments Template = comments-popup.php</li>
<li>Post Template = single.php</li>
<li>Search Form = searchform.php</li>
<li>Search Template = search.php</li>
<li>Sidebar Template = sidebar.php</li>
<li>Stylesheet = style.css</li>
</ol>
<p>For the most part, if you&#8217;re missing any of these parts your theme either won&#8217;t work or won&#8217;t fully function the way Wordpress wants it to.  So far the only thing we&#8217;ve completed is <strong>stylesheet.css</strong> so where do the rest come from?  In <a href="http://www.developertutorials.com/blog/php/designing-and-coding-a-wordpress-theme-from-scratch-part-7-153/">Part 7</a> we&#8217;ll create <strong>index.php</strong> and start marking up our XHTML to PHP.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d151" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-6-151/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+6%29" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-6-151/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+6%29" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-6-151/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+6%29" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-6-151/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Designing and Coding a Wordpress Theme From Scratch (Part 4)</title>
		<link>http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/</link>
		<comments>http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 21:23:17 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Photoshop]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[tut]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/</guid>
		<description><![CDATA[Going From Photoshop to XHTML to Wordpress Theme.  In this multi-part series I'll detail how to create and design a Wordpress theme in Photoshop and take it from just an idea to fully coded.
]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve gone from Photoshop PSD to slices to XHTML using Parts <a href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/">1</a>, <a href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/">2</a>, and <a href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-3-146/">3</a> but if the end result is a Wordpress theme the majority of the work still has to be done.  First of all it&#8217;s important to understand one bit of the operational mechanics of Wordpress.  Wordpress looks for certain information the header of a file called style.css, this is how it can tell themes apart. Here&#8217;s a better explanation from <a href="http://codex.wordpress.org/Theme_Development">Codex</a>:</p>
<blockquote cite="http://codex.wordpress.org/Theme_Development"><p>In addition to CSS style information for your theme, the stylesheet, style.css must provide details about the Theme in the form of comments. No two Themes are allowed to have the same details listed in their comment headers, as this will lead to problems in the Theme selection dialog. If you make your own Theme by copying an existing one, make sure you change this information first.</p>
</blockquote>
<p>Thus, we need to separate our inline CSS and put it in a separate file called style.css</p>
<p><span id="more-147"></span></p>
<p><b>Cleaning up Your XHTML</b></p>
<p>Let&#8217;s start by creating a blank document called style.css in the same directory as your HTML file. Open the CSS file and add the following information:</p>
<pre>/*
Theme Name: your-themes-name
Theme URI: the-theme's-homepage
Description: a-brief-description
Author: your-name
Author URI: your-URI
Template: use-this-to-define-a-parent-theme--optional
Version: a-number-optional

General comments/License Statement if any.
*/</pre>
<p>like so</p>
<p><img src="http://farm3.static.flickr.com/2375/2450107644_8959118e9c.jpg"></p>
<p>Now let&#8217;s open the HTML file the Photoshop created for us which should look something like <a href="http://flickr.com/photos/ww4f/2450125002/" title="click to see the document" rel="_blank">this</a>.<br />
The inline document is essentially divided for us already because everything between the &lt;style&gt; and &lt;/style&gt; tags is going to be cut out of our html document and pasted into the CSS document just after the heading we just added.  Let&#8217;s do that now, copy the style data out of the HTML document and into the CSS document and make sure that you close the tags once you&#8217;ve done so.</p>
<p>The resulting HTML file should now look like this:</p>
<p><img src="http://farm4.static.flickr.com/3193/2449334405_fdf4aff807.jpg"></p>
<p>and the CSS file like this:</p>
<p><img src="http://farm3.static.flickr.com/2111/2449334337_3183c10b1a.jpg"></p>
<p>Got it?  Now lets do some major cleaning.  Now that we&#8217;ve removed the style from our HTML we need to add it back.  We&#8217;re going to replace the empty &lt;style&gt; tags with the following line:</p>
<pre>&lt;link rel="stylesheet" href="style.css" type="text/css" media="screen" /&gt;</pre>
<p>This line is telling our document some very useful information:</p>
<ol>
<li>rel - the relationship of the linked document to the current document</li>
<li>href - the url to the linked document</li>
<li>type - the MIME (Multipurpose Internet Mail Extension) type of the target URL</li>
<li>media - denotes on which device the document is meant to be displayed</li>
</ol>
<p>or the translation for humans: &#8220;Hello, the text file that lives at this URL is a stylesheet that was made for use with documents that would be displayed on computer monitors and screens.&#8221;</p>
<p>We have to do this because we&#8217;ve taken out the style information but since we still want to style our HTML document we have to tell it where the style information now lives.  Next we want to empty all our &lt;div&gt; tags. </p>
<p>Since all our our photoshop images are essentially background images any line from our HTML document that looks like this:</p>
<pre>
   &lt;div id="aqua-01_"&gt;
	&lt;img id="yourfilename_01" src="yourfilename_01.png" width="549"
                  height="126" alt="" /&gt;
   &lt;/div&gt;
</pre>
<p>Should be changed to look like this:</p>
<pre>
	&lt;div id="aqua-01_"&gt;
	&lt;/div&gt;
</pre>
<p>But only when you change the corresponding ID container the CSS document to look like this:</p>
<pre>
	#aqua-01_ {
	position:absolute;
	left:0px;
	top:0px;
	width:549px;
	height:126px;
	background:url(images/aqua_01.png);
	}
</pre>
<p>What we&#8217;ve done is taken the image out of the &lt;div&gt; container in our HTML document and placed in the corresponding ID container in CSS.  This is important because now we can put other things like text or other images into the HTML files &lt;div&gt; container.  This will also allow our page to structure itself properly even if a few images are slow to load.</p>
<p>Finally we want to take anything that is an image and place it in a folder called &#8220;img&#8221; or &#8220;images&#8221;.  If you look at the code above I&#8217;m telling the CSS to look for image files in a folder called &#8220;images&#8221;.  We want to do this for organizational purposes.  Of course this is entirely optional but it&#8217;s good practice and somewhat of an organizational standard.</p>
<p>Are you still confused?<br />
<a href='http://www.developertutorials.com/blog/wp-content/uploads/2008/04/html_css.zip'>Download these files</a> and examine them to see if you can figure out what I did to make the page render properly.</p>
<p>In the next lesson we&#8217;re going learn how to optimize our page for speed using javascript.  Sweating yet? Don&#8217;t worry we&#8217;re already a lot closer than when we started!</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d147" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+4%29" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+4%29" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+4%29" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-4-147/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Designing and Coding a Wordpress Theme From Scratch (Part 2)</title>
		<link>http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/</link>
		<comments>http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 18:05:02 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Photoshop]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[photoshop]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[web dev]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/</guid>
		<description><![CDATA[Going From Photoshop to XHTML to Wordpress Theme.  In this multi-part series I'll detail how to create and design a Wordpress theme in Photoshop and take it from just an idea to fully coded.
]]></description>
			<content:encoded><![CDATA[<p>Designing your first Wordpress theme may seem incredibly ambitious at first but it&#8217;s really not that hard.  It may help your understanding of Wordpress if you find a theme you like and disect or remix it.  This is how I learned to code and one of <a href="http://goscreative.blogspot.com/2008/04/free-wordpress-theme-unstandard-remix.html" target="_blank">my first attempt</a> was a variation of Derek Punsalan&#8217;s theme <a href="http://goscreative.blogspot.com/2008/04/free-wordpress-theme-unstandard-remix.html" target="_blank">The Unstandard</a>.In <a href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/" target="_blank">Part 1</a> I talked a bit about the tools you&#8217;ll need and how to get prepared.  Now that you&#8217;ve done that we&#8217;re going to get started.</p>
<p><b>Layout and Structure</b></p>
<p><a href="http://www.37signals.com/papers/introtopatterns/" target="_blank">This post</a> by 37 Signals is an incredibly detailed account of how to organize information and using sketches to design for the web. I highly recommend taking a break to read it. As mentioned in the post sketching out the general layout of your site will help you.  For my design I started with this sketch:</p>
<p><span id="more-144"></span></p>
<p><img src="http://farm3.static.flickr.com/2073/2448707505_f104ebe039.jpg" alt="sketching a website"></p>
<p>Let&#8217;s compare the sketch to the finished theme:</p>
<p><a href='http://www.developertutorials.com/blog/wp-content/uploads/2008/04/picture-1.png'><img src="http://farm3.static.flickr.com/2001/2449394258_676eb5ea2b.jpg" alt="sketch to code" class="alignnone size-medium wp-image-145" /></a></p>
<p>As you can see my marked up design remains fundamentally similar to the original concept sketch.</p>
<p><b>Designing WordPress Themes in Photoshop</b></p>
<p>We&#8217;ve got our sketch, lets open up Photoshop and start designing.  Since every design is different, I won&#8217;t bother explaining every single choice I made, instead I&#8217;m going to give you some tips on laying out your design so that it can be successfully marked up for the web.  </p>
<ol>
<li>1. <strong>Work to a grid.</strong> I don&#8217;t necessarily mean the grid that you get when you type <strong>Command+&#8217;</strong> but rather working to a structurally sound grid that corresponds to the <a href="http://www.sitepoint.com/article/principles-beautiful-web-design/3" target="_blank">golden ratio</a> or <a href="http://joshuaclanton.com/blog/2008/01/18/one-third-to-rule-them-all-applying-the-rule-of-thirds-to-web-design/" target="_blank">the rule of thirds</a>. This is because Photoshop has to &#8217;slice&#8217; your resulting design into rectangles and if you keep it in mind while you design, that can be done easily at the end.</li>
<p>In the above picture you can see that I worked to a grid that I created using guides.  As my design progressed, the grid got incredibly convoluted but these lines correspond in some way to the layout and skeleton of the site.  I&#8217;d say this is even more important for minimal designs like my own.</p>
<p><img src="http://farm3.static.flickr.com/2260/2449595376_d365e77b2f.jpg" alt="rule of thirds web design"></p>
<li>2.  <strong>The fewer the slices the better.</strong> So when you finish your design you&#8217;ll slice it into sectors that will then be marked up to xhtml and subsequently php to create your theme.  This the last thing you want is a 100 different areas to code separately. If you study the image below you&#8217;ll see that I had about 16 &#8217;sliced areas&#8217;.
<p><img src="http://farm4.static.flickr.com/3100/2449595324_214a605a44.jpg" alt="slice to xhtml wordpress"></p>
<p>Try not to have more than 20.  Why?  Because each of these slices are images that have to be downloaded and displayed when someone visits your website.  The more images, the slower the load time will be for people with slower connections.  Although in <a href="http://www.developertutorials.com/blog/javascript/designing-and-coding-a-wordpress-theme-from-scratch-part-5-149/">Part 5</a> I&#8217;ll show you how to optimize your image based website for speed, it&#8217;s better practice to have fewer slices.</li>
<li><strong>3. Make each content area it&#8217;s own slice.</strong> I can&#8217;t stress how important this is!  For someone new to XHTML it can be incredibly hard to figure out how to float &lt; div &gt; tags so that content areas remain separate.  The laymans solution?  Don&#8217;t bother!  If all your content is contained in &lt; div &gt; &#8217;s for a specific image or &#8217;slice&#8217; you won&#8217;t have to.
<p>Another reason to do this is that if you have a content area that is divided into slices that cut up the content space, you&#8217;re going to have a much harder time trying to make the content display correctly over two background images.
</li>
<li><strong>4. Work in color proof mode.</strong> When I&#8217;m designing for the web I&#8217;ve learned to work entirely, start to finish, in color proof mode (<strong>command+Y for Mac / control+y for Pc</strong>).  This is because colors in Photoshop can be deceiving and if you aren&#8217;t using websafe colors, you need to make sure everything translates as you want it to.  I explained this in more detail in a previous <a href="http://www.developertutorials.com/blog/design/photoshop-design/color-proofing-photoshop-120/" title="color photoshop proof" target="_blank">article here</a>.</li>
<li><strong>5. Think in 3D.</strong>Your design should not be thought of as a flat surface.  It has depth and the things that are different elevations should be treated the same.  For instance, if you have text or images ontop of content areas in your design, you may want to call on them in the stylesheet instead of leaving &#8216;flat&#8217; as part of the background images.  Thus all stylized text like your header text or social bookmarking links should be images that are displayed with CSS.  This is the second and topmost layer of your design with the layout existing <i>below</i></li>
</ol>
<p>Got all that?  Let&#8217;s move on to <a href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-3-146/">Part 3 - Photoshop to XHTML in 24 Hours!</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d144" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+2%29" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+2%29" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+2%29" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Designing and Coding a Wordpress Theme From Scratch (Part 1)</title>
		<link>http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/</link>
		<comments>http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 18:04:35 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Photoshop]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[photoshop]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[tutorials]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/</guid>
		<description><![CDATA[Going From Photoshop to XHTML to Wordpress Theme.  In this multi-part series I'll detail how to create and design a Wordpress theme in Photoshop and take it from just an idea to fully coded.
]]></description>
			<content:encoded><![CDATA[<p>In this multi-part series I&#8217;ll detail how to create and design a Wordpress theme from nothing more than your imagination using Photoshop, CSS, XHTML and PHP.  Before you continue you should look over other tutorials <a href="http://www.developertutorials.com/blog/design/working-with-wordpress-offline-like-a-pro-112/">&#8220;Working with Wordpress Offline Like A Pro</a> and <a href="http://www.developertutorials.com/blog/design/photoshop-design/color-proofing-photoshop-120/">&#8220;Color Proofing Photoshop&#8221;</a> as some of the topics discussed there will come up in this tutorial like working offline to develop themes, and proofing your colors so that they translate accurately for the web. At the end of the entire series I&#8217;ll allow you to download the fully developed theme with the PSD, and theme-files including stylesheets, and javascript.</p>
<p><span id="more-143"></span></p>
<p><b>Tools for the Task</b></p>
<p>For clarification, here are all the tools I used in the making of this theme:</p>
<ul>
<li>A text editor like <a href="http://www.jedit.org/" target="_blank">jEdit</a> for hardcoding</li>
<li><a href="http://adobe.com" target="_blank">Photoshop CS3</a></li>
<li><a href="http://wordpress.org" target="_blank">Wordpress 2.5</a></li>
<li><a href="http://www.mamp.info/" target="_blank">MAMP</a></li>
<li><a href="http://www.colorschemer.com/" target="_blank">Color Schemer Studio</a></li>
<li><a href="http://mozilla.org" target="_blank">Firefox + <a href="https://addons.mozilla.org/en-US/firefox/addon/60" target="_blank">Web Developer Extension</a> (for Local Validation)</li>
<li><a href="http://ipinfo.info/netrenderer/" target="_blank">NetRenderer</a> (to <a href="http://goscreative.blogspot.com/2007/07/tip-website-validation.html" target="_blank">see how your theme looks across browsers</a>)</li>
</ul>
<p>You don&#8217;t have to use the same tools, those are just the ones I use in my workflow.</p>
<p><b>Preparation</b></p>
<p>It&#8217;s important to remember these three things as well:</p>
<ol>
<li><strong>Take your time.</strong>  If this is your first attempt at a wordpress theme, you&#8217;ll make a lot of mistakes.  Just learn from them, the first time is never the best.</li>
<li><strong>Use <a href="http://www.w3schools.com/" target="_blank">W3schools.com</a> religiously!</strong> Why do people validate code, to maximize the exposure of their work.  Learning to validate as you go will improve the quality of the work you produce and eventually make you faster.</li>
<li><strong>Ask a lot of questions.</strong>  If you get stuck please feel free to come back to this column and post questions as comments.  Alternatively you can e-mail me at <strong>jongos [at] gmail</strong> to seek out additional advice but since I like to make information public, if you email me privately your questions may be posted here to help others.</li>
</div>
<p>The End Result:</p>
<p><img src="http://farm3.static.flickr.com/2001/2449394258_676eb5ea2b.jpg"></p>
<p>Like what you see?  Without further adieu <a href="http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-2-144/">let&#8217;s get started</a>.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d143" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+1%29" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+1%29" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/&amp;title=Designing+and+Coding+a+Wordpress+Theme+From+Scratch+%28Part+1%29" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/design/designing-and-coding-a-wordpress-theme-from-scratch-part-1-143/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
