<?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>Existem &#187; Wordpress</title>
	<atom:link href="http://www.existem.com/filed-under/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.existem.com</link>
	<description>Existem - Experts in Affiliate Marketing</description>
	<lastBuildDate>Mon, 19 Jul 2010 13:52:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Quite exciting, this computer magic!</title>
		<link>http://www.existem.com/quite-exciting-this-computer-magic/</link>
		<comments>http://www.existem.com/quite-exciting-this-computer-magic/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 14:34:09 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.existem.com/?p=443</guid>
		<description><![CDATA[Last night I recieved a very nice email from Al Garnsworthy thanking me for a reset wordpress theme I provided him with a while back to help with getting themes to start with a consistant base. To be honest I&#8217;d forgotten I&#8217;d done that, but it was nice to hear it was being used&#160;successfully.
With the [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I recieved a very nice email from <a href="http://OakDiningtableandChairs.com">Al Garnsworthy</a> thanking me for a reset wordpress theme I provided him with a while back to help with getting themes to start with a consistant base. To be honest I&#8217;d forgotten I&#8217;d done that, but it was nice to hear it was being used&nbsp;successfully.</p>
<p>With the <a href="http://www.affiliates4u.com/forums/affiliate-marketing-lounge/127589-going-head-head-a4u-member-rival-sites-17.html#post558910">Head to Head </a>post now at 17 pages strong on affiliates4u.com I&#8217;ve now had a few requests for it to be distributed publicly, so <a href="http://www.existem.com/wp-content/themes/metsixe/docs/smellslikewordpress.zip">here it&nbsp;is</a>.</p>
<h2>What does it&nbsp;do?</h2>
<ol>
<li>Strips out any un-nesscissary php and database calls wherever&nbsp;possible.</li>
<li>Structures the theme in a semantic way using&nbsp;<span class="caps">POSH</span></li>
<li>Resets the css using the Eric Meyers&#8217; <span class="caps">YUI</span>&nbsp;stylesheet</li>
<li>Provides css hints for styling&nbsp;elements.</li>
<li>Seperates stylesheets into elements (type, comments&nbsp;etc&#8230;)</li>
<li>Provides a nicer default for comment and form styling (via a seperate stylesheet so you don&#8217;t have to use&nbsp;them)</li>
<li>Formats html in posts in a cleaner&nbsp;manner</li>
<li>Provides a paging system, independent of a&nbsp;plugin</li>
<li>Provides a better post excerpt that can be adjusted to suit any text&nbsp;length</li>
<li>Includes conditionals for <span class="caps">IE6</span> and <span class="caps">IE7</span> aswell as a default style for really old&nbsp;browsers</li>
<li>Includes a custom post image field for uploading and including post thumbnails. These image scale dynamically and can be adjusted easily from within the theme files. (You will need 777 permissons on the cache folder on your server for this to&nbsp;work)</li>
</ol>
<h3>What it doesn&#8217;t&nbsp;do</h3>
<ol>
<li>Style the theme in anyway, bar a few&nbsp;defaults</li>
<li>Include custom templates for different page&nbsp;layouts</li>
<li>Assume a beginners knowledge. Having some idea of how to use a wordpress theme is&nbsp;advised</li>
<li>Style&nbsp;widgets.</li>
<li>Work with pre 2.8.5 wordpress&nbsp;versions</li>
<li>Come with a users manual, though you can ask questions on this post if you&nbsp;wish</li>
</ol>
<p>If you want a copy, it&#8217;s free to <a href="http://www.existem.com/wp-content/themes/metsixe/docs/smellslikewordpress.zip">download here</a>. Please note, I&#8217;ve made a few tweaks to it so there maybe a few bugs. If you come across one, please let me&nbsp;know.</p>
<p>P.S - You&#8217;re only allowed to use it if you say thank you&nbsp;;)</p>
<p>Otherwise,&nbsp;Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.existem.com/quite-exciting-this-computer-magic/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Designing a Wordpress Theme From Scratch (The Theme)</title>
		<link>http://www.existem.com/designing-a-wordpress-theme-from-scratch-the-theme/</link>
		<comments>http://www.existem.com/designing-a-wordpress-theme-from-scratch-the-theme/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 13:12:56 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.existem.com/?p=168</guid>
		<description><![CDATA[First off I&#8217;d like to apologise for the big gap between posts. I&#8217;ve been busy here at Existem HQ and haven&#8217;t had any spare time at night to finish off the&#160;theme.
Thankfully, I&#8217;ve completed it and it is available to download here now. You can preview the theme here

Below are the instructions on how to install [...]]]></description>
			<content:encoded><![CDATA[<p>First off I&#8217;d like to apologise for the big gap between posts. I&#8217;ve been busy here at Existem <span class="caps">HQ</span> and haven&#8217;t had any spare time at night to finish off the&nbsp;theme.</p>
<p>Thankfully, I&#8217;ve completed it and it is available to<a href="http://www.breakfast-epiphanies.com/breakfast-theme.zip"> download here now.</a> You can preview the theme <a href="http://www.breakfast-epiphanies.com">here<br />
</a></p>
<p>Below are the instructions on how to install the theme to get the most out of it. Please let me know how you get on if you use it. I will be completing the tutorial next week that will walk through how I took the html mock up and made it into a wordpress&nbsp;theme.</p>
<p>Included in the zip file are all the original psd files so you can easily adapt the theme to suit&nbsp;you.</p>
<p><strong>Install&nbsp;Instructions</strong></p>
<ol>
<li>Download and unzip the theme to your local themes&nbsp;folder</li>
<li>Open up header.php and set up the variables in the header to link to your website. This will link the stylesheets etc to the correct&nbsp;place</li>
<li>Change the page navigation (also in the header) to the appropriate pages on your&nbsp;site.</li>
<li>Add your twitter script to the footer.php just above the body. This theme works best with only one tweet displayed. Remember to remove the dummy text from&nbsp;sidebar.php</li>
<li>Upload to your themes folder on your&nbsp;website</li>
<li>Add the archives, category and blogroll widget to the sidebar using the widgets page. The theme is set up to take these three by default, if you add others you will need to style them in the&nbsp;style.css</li>
<li>Thats it, rock and&nbsp;roll</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.existem.com/designing-a-wordpress-theme-from-scratch-the-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designing A Wordpress Theme From Scratch (Part Two)</title>
		<link>http://www.existem.com/designing-a-wordpress-theme-from-scratch-part-two/</link>
		<comments>http://www.existem.com/designing-a-wordpress-theme-from-scratch-part-two/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 14:18:17 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[Start-ups]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.existem.com/?p=159</guid>
		<description><![CDATA[Before we start, a bit of&#160;housekeeping
If you missed part one of this tutorial it is available&#160;here
The final layout for this part of the tutorial you can see&#160;here.
You can download the original files for this tutorial here if you&#160;wish.
You can also grab my base template&#160;here
Feel free to play around with all the files until your hearts [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Before we start, a bit of&nbsp;housekeeping</strong></p>
<p>If you missed part one of this tutorial it is available<a href="http://www.existem.com/archives/category/wordpress">&nbsp;here</a></p>
<p>The final layout for this part of the tutorial <a href="http://www.breakfast-epiphanies.com/layoutfiles/">you can see&nbsp;here</a>.</p>
<p>You can download the original files for this tutorial <a href="http://www.breakfast-epiphanies.com/layoutfiles/layoutfiles.zip">here</a> if you&nbsp;wish.</p>
<p>You can also grab my base template&nbsp;<a href="http://www.breakfast-epiphanies.com/layoutfiles/base_template.zip">here</a></p>
<p><strong>Feel free to play around with all the files until your hearts content, that&#8217;s always a good way to learn and you can always grab a fresh copy and start&nbsp;over.</strong></p>
<h2><strong>Marking up the&nbsp;template</strong></h2>
<p>Depending on the size of the project you could well choose just to code straight into a wordpress php theme. However its a good learning exercise, and good practice if you are doing something a bit different, to code into a static html page first and then split that page into separate php documents&nbsp;afterwards.</p>
<p><a href="http://www.existem.com/wp-content/uploads/2008/07/basic-layout.jpg"><img class="alignnone size-medium wp-image-160" title="basic-layout" src="http://www.existem.com/wp-content/uploads/2008/07/basic-layout-595x327.jpg" alt="" width="595" height="327" /></a></p>
<p>If you visit <a href="http://www.breakfast-epiphanies.com/basic_site/">http://www.breakfast-epiphanies.com/basic_site/</a> and view the source you will see that I have laid out an extremely basic layout of elements with good semantic structure. This is the basic underpinning of every site and its a good idea to do this&nbsp;first.</p>
<p>Some people will write pure html first then css afterwards. Personally I&#8217;m more back and forth between the two but I find having a basic skeleton in html really helpful before doing any&nbsp;css.</p>
<p>As you can see we will be using &#8216;header 1 tags&#8217; for the logo/blog title so this is high up in the document. We will be using an unordered list for the navigation as that is in essence what it is. (Same applies for the footer). We also have two sidebars floated next to each other in order of&nbsp;importance.</p>
<p>The wrapper holds all of the sites content and has an additional <span class="caps">ID</span> of top. This acts as an anchor and means we can skip back to the top of the document easily, helpful when you have a long&nbsp;page.</p>
<h2><strong>Lets go coding - html from the top&nbsp;down.</strong></h2>
<p>Although I just said I usually jump between css and html, for the purpose of this tutorial I&#8217;ll split the two apart as its a lot easier to explain that way. What I thought I would do is go through the html document in order from top to bottom picking out some of the elements and explaining my&nbsp;decisions.</p>
<p>O.K, head over to <a href="http://www.breakfast-epiphanies.com/layoutfiles/">http://www.breakfast-epiphanies.com/layoutfiles/</a> and view source. Or download the tutorial files and open in your favourite&nbsp;editor.</p>
<p>1. Right after the &lt;body&gt; tag 	we have a skip link which will jump the user down to the main bulk 	of content on the site. This is particularly useful for mobile 	browsers where space is an issue. This link is then styled via css 	to appear hidden until in focus (hit that tab key) - <span style="text-decoration: line-through;">note 	this doesn&#8217;t seem to work in Firefox 3.</span><em> (Ammedned 10 July 08 - turns out I put it on a really silly 	number for z-index in the css and <span class="caps">FF</span> 3 didn&#8217;t like&nbsp;it.)</em></p>
<p>2. Next up we have the coffee cup 	icon. This is purely presentational and although I know many purists 	hate this kind of extra mark up, to me the web is a visual medium 	too and using something like this now and again I don&#8217;t think hurts 	anyone now does&nbsp;it?.</p>
<p>The reason it sits outside of the wrapper is 	because I want it sticking above everything else on its own z-index. 	As you will see later on, we need to declare the wrapper&#8217;s overflow 	state as hidden so <span class="caps">IE</span> won&#8217;t kill the site. If the coffee cup was within the wrapper it would cut the 	top&nbsp;off.</p>
<p>3. Below this the wrapper begins 	which will hold all the site&#8217;s content. As I said above it has an <span class="caps">ID</span> 	aswell for anchor&nbsp;tagging.</p>
<p>Then we have our logo. Here I 	have used a css image replacement technique to replace the text. 	This is useful because you can still retain your all important 	&#8216;header 1 tags&#8217;  in the html which are search engine&#8217;s bread and 	butter but you can now add your logo too. How cool is&nbsp;that.</p>
<p>I&#8217;ll go over how to css this in the 	next&nbsp;section.</p>
<p>4. Next we have the anchor for the 	skip link to move to. Ideally I would apply this to the first 	element in the main&nbsp;content.</p>
<p>In this instance though the first chunk 	of content would be &#8216;the_post&#8217; which will be in the wordpress loop 	when we come to theme the template later on.By placing the link just before the 	loop it will move the page to the main content without getting 	involved in the&nbsp;loop.</p>
<p>5. The section  &#8216;the_post&#8217; is what 	will contain the bulk of the site content as this will be the main 	loop. This section has a class called &#8216;the_post&#8217; applied to&nbsp;it.</p>
<p><a href="http://www.existem.com/wp-content/uploads/2008/07/loop.jpg"><img class="alignnone size-medium wp-image-161" title="loop" src="http://www.existem.com/wp-content/uploads/2008/07/loop-595x327.jpg" alt="" width="595" height="327" /></a></p>
<p>I 	use a class because they can be re-used. I tend to use classes 99% 	of the time for this reason.In addition, I add an extra class of 	&#8216;even&#8217; <span class="caps">OR</span> &#8216;odd&#8217;. This will give us added benefit if we wish to style 	alternate posts differently. Adding multiple classes allows us to 	overwrite bits of the parent classes while inheriting the remaining 	styles of the&nbsp;parent.</p>
<p>E.g - If the parent class has a 	margin of 10px and a border of 1px we could use the child class to 	remove the border but keep the margin by just declaring border:none; 	in the child class. This would remove the border but keep the margin 	as no new style for margin was&nbsp;applied.</p>
<p>Later on will we build a  function 	into the worpress loop with a little php so we can add alternate odd 	and even child classes to each post but for now we will emulate how 	wordpress will display the&nbsp;code.</p>
<p>6. After the wordpress loop will 	come the endif statement. This is where the page navigation will be 	so we need to look at mocking that up in the template too.I used a similar technique to how we 	replaced the title text here using pure css to replace the text with 	images. Again I will cover this in the next&nbsp;section.</p>
<p>7. The first sidebar is floated to 	the right of the main content. Some of the content is styled in a 	conventional manner as we will be coding this into the side bar but 	I have also emulated how wordpress displays widgets using an extra 	wrapping &#8216;li&#8217; for some reason. If we were not using widgets 	you could style this in a conventional manner using &#8216;ul&#8217;&nbsp;tags.</p>
<p><a href="http://www.existem.com/wp-content/uploads/2008/07/sidebar.jpg"><img class="alignnone size-medium wp-image-162" title="sidebar" src="http://www.existem.com/wp-content/uploads/2008/07/sidebar-595x327.jpg" alt="" width="595" height="327" /></a></p>
<p>You will notice at the top of the 	side bar we have a &#8216;div&#8217; with a title &#8216;optimised&#8217;. This 	displays a little image that tells the user that their browser is 	fairly new and as a result will display the site as it was meant to 	be seen. By using attribute selectors via css we can hide the image 	and display the text for <span class="caps">IE6</span> and older browsers as they do not 	support the attribute class. Again I will cover this in the next&nbsp;section</p>
<p>8. Next to the first sidebar is the 	second sidebar which has much the same styles as the first. I tend 	to use this sidebar for banners&nbsp;etc&#8230;</p>
<p>9. Lastly we have a simple footer 	which will provide our legal info and credits and will also clear 	the floating coloums above&nbsp;it.</p>
<h2><strong>Lets go coding - the power of&nbsp;css.</strong></h2>
<p>In this section I will cover a few of the css features I have used to make this site. I won&#8217;t be covering things like basic layout properties, text size etc&#8230; If you want to know all this please pick through the source code. Its all commented to help&nbsp;you.</p>
<p><strong>Achieving Semi Fluid Layout</strong> - Because we want our wrapper to fold the sidebars underneath each 	other if the browser is at a smaller resolution we need to use 	percentages. Here&#8217;s what I did to achieve this&nbsp;effect:</p>
<p>width:auto !important;<br />
width:100%;<br />
position:relative;<br />&nbsp;overflow:hidden;</p>
<p>The width is set to auto!important and 100% in two different decelerations. This fixes Firefox&#8217;s bug that sometimes messes up a 100% width&nbsp;layout.</p>
<p>The overflow is set to hidden so <span class="caps">IE</span> doesn&#8217;t add horizontal scroll&nbsp;bars.</p>
<p>Position relative is used as a fail safe for <span class="caps">IE6</span> as this can sometimes sort out hasLayout problems (more on that later). You don&#8217;t necessarily have to add&nbsp;this.</p>
<p><strong>Css Image Replacement</strong> - This is a great technique for getting the best of both worlds, search engine friendly text content and visually appealing images.<br />
This example below is how I have styled the page navigation, a similar technique is also used to style the logo. Here&#8217;s what I did to achieve this&nbsp;effect:</p>
<p>div.page_buttons {<br />
margin:0;<br />
padding:58px 0 0 15px;<br />
width:570px;<br />
height:80px;<br />
background:transparent;<br />&nbsp;}</p>
<p>/*Trade text for buttons*/<br />
div.page_buttons a.next {<br />
margin:0;<br />
padding:0;<br />
display:block;<br />
float:left;<br />
width:51px;<br />
height:51px;<br />
text-indent:-99999px;<br />
background:url(../images/page-navigation-buttons.png) transparent no-repeat 0 0;<br />&nbsp;}</p>
<p>The div class &#8216;page_buttons&#8217; is the holder that will hold all there of our navigation buttons. The background is transparent as we will need there to be no background or we won&#8217;t get the proper&nbsp;effect.</p>
<p>Then we style the a links using a class defined in each link. E.G ( a.next) â€“ In the html it looks like a&nbsp;class=â€nextâ€</p>
<p>By using display:block we can give an element width and height properties and by floating it left we can make them sit next to each&nbsp;other.</p>
<p>Text indent is used to push the text that the image is replacing off the page so it is no longer&nbsp;visible.</p>
<p>Finally we define the image path, its background colour, its repeating property and its background&nbsp;position.</p>
<p>In this case it is set to no-repeat transparent and we be possitioned top left (or 0 0) in the 51px x 51px area we have&nbsp;created.</p>
<p><strong>Attribute Selectors</strong> - These are great for adding additional styles but in this site I 	have used them to create a little badge letting the user know if their browser is up to&nbsp;date.</p>
<p>Here&#8217;s&nbsp;how:</p>
<p>I created a &#8216;div&#8217; element with the title&nbsp;&#8216;optimisesd&#8217;.</p>
<p>Attributes can use most things but I prefer to use title where I can.Within that &#8216;div&#8217; I create a paragraph style with the class&nbsp;&#8216;alert&#8217;.</p>
<p>Then in the css we do&nbsp;this:</p>
<p>div[title=&#8221;optimised&#8221;] {<br />
width:245px;<br />
height:81px;<br />
background:url(../images/optimised-badge.jpg) transparent no-repeat 0 0;<br />
display:block;<br />
text-indent:-99999px;<br />
margin:0 0 15px 0;<br />
padding:0 0 15px 0; /*Pad down the border bottom*/<br />
border-bottom:1px dotted #1b0f05;<br />&nbsp;}</p>
<p>/*Styles the alert text in ie6*/<br />
*html .alert {<br />
background:#fff;<br />
padding:5px;<br />&nbsp;}</p>
<p>div[title=â€optimisedâ€] is the attribute seclector.<br />
Within this we define the width, height etc&#8230; as well as using text indent as before to replace the text with an&nbsp;image.</p>
<p>Next we style the text that older browsers will see using the &#8216;*html .alert class&#8217;. We use the *html hack so that <span class="caps">IE6</span> will pick it up but <span class="caps">IE7</span>, <span class="caps">FF</span>, Safari etc.. will&nbsp;not.</p>
<p><strong>:After Class for Firefox - </strong>If you are using Firefox you may have noticed the little pencil icons on the headers in the sidebar. These are added using the :after class, which at the time of writing are only supported in Firefox (as far a I&nbsp;know).</p>
<p>I quite like this technique to add little visual additions without weighing down the code too&nbsp;much.</p>
<p>Here&#8217;s&nbsp;how</p>
<p>h2.widgettitle:after  {<br />
content:url(&#8220;../images/pencil-icon.png&#8221;);<br />
margin:-35px 0 0 210px;<br />
position:absolute;<br />
z-index:10;<br />
padding:0;<br />
width:33px;<br />
height:34px;<br />
display:block;<br />&nbsp;}</p>
<p>We again use display:block so we can apply width and&nbsp;height.</p>
<p>By using the content deceleration we can apply an image to the :after&nbsp;class.</p>
<p>By using position:absolute we can pull the element around independent of the hierarchy. This means we can use positive and negative margins to position it where we want&nbsp;it.</p>
<p><strong>Multiple Classes </strong>- We can use multiple classes to overide certain parts of a class while inheriting others as discussed&nbsp;above.</p>
<p>div.the_sidebar {<br />
margin:0 20px 0 0;<br />
padding:0;<br />
float:left;<br />
width:245px;<br />&nbsp;}</p>
<p>div.last {<br />
margin:0;<br />
padding:5px 0 0 0;/*Pad down abit so everything lines up*/<br />&nbsp;}</p>
<p>As you can see the sidebar has margin properties, float, padding and width properties&nbsp;applied.</p>
<p>We want our last sidebar to share the float and width properties but not the margin or padding properties so we define new ones. Then we create multiple classes in the html like&nbsp;so:</p>
<p>div class=â€sidebar&nbsp;lastâ€</p>
<h2><strong>hasLayout and other <span class="caps">IE</span>&nbsp;tricks</strong></h2>
<p><span class="dquo">&#8220;</span>A lot of Internet Explorer&#8217;s rendering inconsistencies can be fixed by giving an element&nbsp;&#8216;layout.&#8217;&#8221;.</p>
<p>In brief <span class="caps">IE6</span> does not give layout properties to all elements and this is what often breaks sites in Internet&nbsp;Explorer.</p>
<p>By giving an element &#8216;layout&#8217; we can often fix many problems associated with the&nbsp;browser.</p>
<p>A detailed explanation is available here&nbsp;<a href="http://www.satzansatz.de/cssd/onhavinglayout.html">http://www.satzansatz.de/cssd/onhavinglayout.html</a>.</p>
<p>My personal way of dealing with this is to give hasLayout to an element by using zoom:1. There are several other ways, each with pros and cons but this is my method of choice (even if I have to sacrifice validation in&nbsp;<span class="caps">IE6</span>)</p>
<p><strong>Other Tricks for&nbsp;<span class="caps">IE</span></strong></p>
<p>overflow: hidden; - Its amazing how often this will sort out all sorts of things, even if logically it&nbsp;shouldn&#8217;t</p>
<p>word-wrap:break-word; - This allows wordpress to break words apart rather than poking out of a containing&nbsp;div.</p>
<p>position:absolute; - If an element is missing this 9 times out of 10 will bring it back into&nbsp;play</p>
<p>display:inline; - If you seem to have double margins this will sort that&nbsp;out</p>
<p>*html &#8216;your class or <span class="caps">ID</span>&#8217; - <span class="caps">IE</span> 6 and below hack to target older&nbsp;browsers</p>
<p>html &gt; body  &#8216;your class or <span class="caps">ID</span>&#8217; - Target newer browsers with this to bypass <span class="caps">IE6</span> and&nbsp;below</p>
<p>So that just about wraps up part two. As usual, any questions please add them below. Until part&nbsp;three&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.existem.com/designing-a-wordpress-theme-from-scratch-part-two/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Designing a wordpress theme from scratch (Part One)</title>
		<link>http://www.existem.com/designing-a-wordpress-theme-from-scratch-part-one/</link>
		<comments>http://www.existem.com/designing-a-wordpress-theme-from-scratch-part-one/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 10:20:57 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[Our sites]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.existem.com/?p=142</guid>
		<description><![CDATA[Designing for wordpress isn&#8217;t really all that different from designing any other website, yet it seems to be that its not something that gets approached as creatively, or is given as much thought as traditional web&#160;design.
Yes it&#8217;s true wordpress has some limitations, but on the whole its a great tool that&#8217;s simple to use and [...]]]></description>
			<content:encoded><![CDATA[<p>Designing for wordpress isn&#8217;t really all that different from designing any other website, yet it seems to be that its not something that gets approached as creatively, or is given as much thought as traditional web&nbsp;design.</p>
<p>Yes it&#8217;s true wordpress has some limitations, but on the whole its a great tool that&#8217;s simple to use and you can still be really creative with&nbsp;it.</p>
<p>In the first part of this series of tutorials I&#8217;ll be looking at how to structure your design composition in a way that makes it easier to code into&nbsp;xhtml/css.</p>
<p>I&#8217;ll also look at basic semantic mark-up and using css to degrade your site nicely into older&nbsp;browsers.</p>
<p>The final layout for this part of the tutorial <a href="http://www.breakfast-epiphanies.com/layoutfiles/">is viewable&nbsp;here</a>.</p>
<p>Later on we will split this design up and turn it into a wordpress&nbsp;theme.</p>
<h2>First Things&nbsp;First&#8230;</h2>
<p>Credit where its due. A few of the techniques I employ in my site design have been taken from <a href="http://hicksdesign.co.uk/">Jon Hicks</a> and in particular his talk at <span class="caps">FOWD</span> which you can <a href="http://www.vimeo.com/932467">view&nbsp;here.</a></p>
<p>The final layout for this part of the tutorial <a href="http://www.breakfast-epiphanies.com/layoutfiles/">you can see&nbsp;here</a>.</p>
<p>You can download the original files for this tutorial <a href="http://www.breakfast-epiphanies.com/layoutfiles/layoutfiles.zip">here</a> if you&nbsp;wish.</p>
<p>You can also grab my base template (which we will cover using in the next paragraph)&nbsp;<a href="http://www.breakfast-epiphanies.com/layoutfiles/base_template.zip">here</a></p>
<p>Feel free to play around with all the files &#8216;til your hearts content, that&#8217;s always a good way to learn and you can always grab a fresh copy and start&nbsp;over.</p>
<h2>Setting up a template system makes your life&nbsp;easy</h2>
<p>First thing I do is make a copy of my base template (which has several folders, one for images, one for css, one for javascript, one for library (which will hold any extra scripts like jquery plugins etc&#8230;), a dev folder for all photoshop files etc.. and an index.html page + several stylesheets, all of which contain helpful snippets and basic markup) and rename the parent folder to the project&nbsp;name</p>
<p><a href="http://www.existem.com/wp-content/uploads/2008/06/template-setup.png"><img class="alignnone size-medium wp-image-143" title="template-setup" src="http://www.existem.com/wp-content/uploads/2008/06/template-setup-595x308.png" alt="" width="595" height="308" /></a></p>
<p>You can download my base template <a href="http://www.breakfast-epiphanies.com/layoutfiles/base_template.zip">here if you&nbsp;wish.</a></p>
<p>Now we are ready to&nbsp;begin</p>
<h2>Design First Steps - Basic Layout <span class="amp">&amp;</span>&nbsp;Structure</h2>
<p>When you design your site, in whichever graphics program you use, ultimately you&#8217;ll make most of your decisions on layout at this&nbsp;stage.</p>
<p>Each project requires it&#8217;s own decisions to be made on where the navigation goes, how many sidebars you have, if its fixed or fluid width etc&#8230; ultimately it depends on what you are aiming&nbsp;for.</p>
<p>I&#8217;m not going to cover &#8216;how to design a website&#8217; as everyone has their own style. What I will say is useful however is to write down your hex colour codes and column widths (either in a comment portion in you css file or on actual paper). These come in really handy later on. If you&#8217;re like me and sometimes you just can&#8217;t get colours gelling, <a href="http://kuler.adobe.com/">http://kuler.adobe.com/</a> is great for a helping&nbsp;hand.</p>
<p>Once I have the design down, I have sliced out the images to my images folder and written down my hex codes and column widths, I start marking up the comp with really basic structure as follows (I actually print it out and write on it but for the purposes of this tutorial I&#8217;ve done it in&nbsp;photoshop).</p>
<p><a href="http://www.existem.com/wp-content/uploads/2008/06/layout-extended-marked1.jpg"><img class="alignnone size-medium wp-image-149" title="layout-extended-marked1" src="http://www.existem.com/wp-content/uploads/2008/06/layout-extended-marked1.jpg" alt="" width="595" height="380" /></a></p>
<p>This provides me with a quick idea of how I&#8217;m going to mark up the site as well as giving me a visual flow to&nbsp;follow.</p>
<p>Now the more observant among you will notice that the site doesn&#8217;t look exactly like that. This is because when it came to marking up the site into xhtml later on I made a two&nbsp;decisions.</p>
<p>1. I wanted the navigation higher up in the html as in this design it was in the sidebar and as a result, half way down in the mark up which is not great for site structure. I could have solved this by floating it next to the logo at the top of the page&nbsp;but&#8230;</p>
<p>2. I added the second sidebar which made me want the site to fold together if it was viewed in a smaller resolution. As a result I wanted the navigation to be high up in the document, even if the site was viewed at a really small resolution. Having it floated next to the logo would make it fold underneath but retain its small width which wasn&#8217;t&nbsp;ideal.</p>
<p>I always think its worth following your gut on these things and not sticking so rigidly to your comp. I feel the site is better for the slight changes I made to the layout and if it hadn&#8217;t worked I could have always fallen back on my initial&nbsp;idea.</p>
<h2>Getting into the code - Setting up your style sheets for the best cross browser&nbsp;performance</h2>
<p>I&#8217;ve used Jon&#8217;s method for this as I find it really&nbsp;robust.</p>
<p>What we have in the &lt;head&gt; portion of the page is one linked, one imported, one print and two <span class="caps">IE</span> specific&nbsp;stylesheet.</p>
<p><a href="http://www.existem.com/wp-content/uploads/2008/06/stylesheets.jpg"><img class="alignnone size-medium wp-image-153" title="stylesheets" src="http://www.existem.com/wp-content/uploads/2008/06/stylesheets-595x338.jpg" alt="" width="595" height="338" /></a></p>
<p><strong>1. The basic&nbsp;stylesheet</strong></p>
<p>This is linked into the document using &lt;link&nbsp;href&gt;</p>
<p>As older browsers don&#8217;t understand @import this is the stylesheet those browsers will find. All this stylesheet does is style the page in a simple way and let the user know politely that their browser is a bit old&nbsp;now.</p>
<p><a href="http://www.existem.com/wp-content/uploads/2008/06/image-simple.png"><img class="alignnone size-medium wp-image-150" title="image-simple" src="http://www.existem.com/wp-content/uploads/2008/06/image-simple-595x433.png" alt="" width="595" height="433" /></a></p>
<p>2. <strong>The m</strong><strong></strong><strong>ain&nbsp;stylesheet</strong></p>
<p>This is brought into the document using<code>&nbsp;@import"css/style.css"/**/;</code></p>
<p>The <code>/**/;</code> at the end bypasses IE browsers older than IE6 as they don&#8217;t understand it, which means anything older than IE6 will be passed the basic&nbsp;stylesheet.</p>
<p>The<strong> main stylesheet </strong>also has two @imports for typography and a reset&nbsp;stylesheet.</p>
<p>The reset stylesheet resets browsers to their default styling and then adds some sensible&nbsp;defaults.</p>
<p>The typography stylesheet controls the basic type styles for the&nbsp;site.</p>
<p><a href="http://www.existem.com/wp-content/uploads/2008/06/imports.png"><img class="alignnone size-medium wp-image-151" title="imports" src="http://www.existem.com/wp-content/uploads/2008/06/imports-595x263.png" alt="" width="595" height="263" /></a></p>
<p>3. <strong></strong><strong><span class="caps">IE</span> 7</strong><strong> only stylesheet</strong> which holds all the styles for that&nbsp;browser.</p>
<p>In this stylesheet I also use @import to import the <span class="caps">IE6</span> stylesheet as <span class="caps">IE7</span> shares a lot of the same problems as <span class="caps">IE6</span> and its a bit daft to write them out twice. If an <span class="caps">IE7</span> element needs styling differently from both the main stylesheet and the <span class="caps">IE6</span> stylesheet, this is where we put those&nbsp;styles.</p>
<p>Below is an example of what I&nbsp;mean.</p>
<p><a href="http://www.existem.com/wp-content/uploads/2008/06/ie7.png"><img class="alignnone size-medium wp-image-152" title="ie7" src="http://www.existem.com/wp-content/uploads/2008/06/ie7-595x168.png" alt="" width="595" height="168" /></a></p>
<p><strong>4.</strong><strong> <span class="caps">IE6</span> only</strong><strong> stylesheet </strong>which holds styles for&nbsp;<span class="caps">IE6</span>.</p>
<p>This stylesheet holds all the styles for <span class="caps">IE6</span>. Where I don&#8217;t want an element to be shared with the <span class="caps">IE7</span> stylesheet I use the *html hack (see example below). This way <span class="caps">IE6</span> can share elements with <span class="caps">IE7</span> and also have styles just for&nbsp;itself.</p>
<p><a href="http://www.existem.com/wp-content/uploads/2008/06/ie6.png"><img class="alignnone size-medium wp-image-154" title="ie6" src="http://www.existem.com/wp-content/uploads/2008/06/ie6-595x235.png" alt="" width="595" height="235" /></a></p>
<p>Phew, that was fairly&nbsp;intense!&#8230;</p>
<h2>Getting into the code - Basic layout&nbsp;mark-up</h2>
<p>Once we have our template set up and images ready to go all that&#8217;s left is to start marking up. I&#8217;ll go much further into this in my next tutorial but lets get the basic principles down now. (Note that this is my way of doing it, you might have a different approach and that&#8217;s cool. If you find this way helpful in any way then&nbsp;great).</p>
<p><strong>Use classes for most layout elements.</strong> This not only 	means you can re-use certain elements throughout the page, but you 	can build up multiple classes on certain elements to vary styling. I 	only use <span class="caps">ID</span>&#8217;s when dealing with javascript, anchors or flash 	content. <strong></strong></p>
<p><strong>Use a wrapper to contain the site.</strong> This gives you greater control of where and how the whole site is 	positioned. This way if you decide you want to move it all to center 	alignment for example you can very easily. <strong></strong></p>
<p><strong>Use &lt;h1&gt; for you blog title/logo and all your blog 	post titles. </strong>These tags are 	really important for <span class="caps">SEO</span> so this just makes&nbsp;sense.</p>
<p><strong>Use lists for lists <span class="amp">&amp;</span> paragraphs for paragraphs.</strong> Semantically its correct 	and it helps you identify what&#8217;s what quickly. <strong></strong></p>
<p><strong>Ban the &lt;br/&gt;. </strong>I&#8217;m 	not talking in posts but in layouts. You can break things apart 	using margins and padding in css. <strong></strong></p>
<p><strong>Cut down on images in the html layout. </strong>If 	you can use background images or replace text with images via css 	(i.e for the logo, buttons etc&#8230;) then do. A good marker is, if you 	can switch off your stylesheet and see a nicely structured text 	document with few layout related images, your on the right&nbsp;lines.</p>
<p>That about wraps it up for part one. In the second tutorial I will look at building the site in more detail and cover some css techniques for taking the design to the next&nbsp;level.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.existem.com/designing-a-wordpress-theme-from-scratch-part-one/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
