<?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>design is philosophy &#187; Tutorials</title>
	<atom:link href="http://www.designisphilosophy.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.designisphilosophy.com</link>
	<description>WordPress, Expression Web, CSS, other stuff</description>
	<lastBuildDate>Tue, 31 Jan 2012 03:10:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://www.designisphilosophy.com/?pushpress=hub'/>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to remove WP Geo plugin from specific pages</title>
		<link>http://www.designisphilosophy.com/tutorials/how-to-remove-wp-geo-plugin-from-specific-pages/</link>
		<comments>http://www.designisphilosophy.com/tutorials/how-to-remove-wp-geo-plugin-from-specific-pages/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 19:17:45 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp geo]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=1692</guid>
		<description><![CDATA[I ran a cross a rather interesting situation this week while working on the Vi Er Der Du Er site. The site uses the WP Geo plugin extensively on both pages, and posts, and custom post types but I needed &#8230; <a href="http://www.designisphilosophy.com/tutorials/how-to-remove-wp-geo-plugin-from-specific-pages/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I ran a cross a rather interesting situation this week while working on the <a href="http://www.vierderduer.no" title="Vi Er Der Du Er" target="_blank">Vi Er Der Du Er</a> site. The site uses the <a href=" http://wordpress.org/extend/plugins/wp-geo/" title="WP Geo" target="_blank">WP Geo plugin</a> extensively on both pages, and posts, and custom post types but I needed to deactivate it for one particular page because I was embedding a different custom Google Map. Not surprisingly the scripts calling my custom map were conflicting with the scripts calling WP Geo and as a result the map on the page in question didn&#8217;t work.</p>
<p>At first I thought it was a matter of removing the actions that called the plugin itself. I&#8217;ve done this in the past and it works for some plugins. I also found a <a href="http://snipplr.com/view/50417/" title="Snippet" target="_blank">code snippet here</a> that seemed to show it working. That unfortunately was not the case. So I had to keep digging. Then I found this excellent article <a href="http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles" title="How to disable scripts and styles in WordPress" target="_blank">How to disable scripts and styles by Justin Tadlock</a> that explained it all: I needed to de-register the scripts, not simply remove the function. </p>
<p>After digging through the plugin code I found the script calls and ended up with this code snippet in my functions.php file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">// remove WP Geo JS/CSS from the nybank page</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_print_scripts'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'vierderduer_deregister_javascript'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">100</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> vierderduer_deregister_javascript<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_page_template<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'page-nybank.php'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		wp_deregister_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'googe_jsapi'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		wp_deregister_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'jquery'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		wp_deregister_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'googlemaps'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		wp_deregister_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wpgeo'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		wp_deregister_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wpgeotooltip'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		wp_deregister_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wpgeo-admin-post'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>As you can see I made the function conditional so it only kicks in when a specific page template is used. You can swap out that condition for any other condition for the same result. Bottom line is it works and now WP Geo works on every page, post and post type except pages that use the page-nybank.php template file. </p>
<div class="addthis_toolbox addthis_default_style" addthis:url='http://www.designisphilosophy.com/tutorials/how-to-remove-wp-geo-plugin-from-specific-pages/' addthis:title='How to remove WP Geo plugin from specific pages' ><a class="addthis_button_facebook like"></a><a class="addthis_button_twitter"></a><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/how-to-remove-wp-geo-plugin-from-specific-pages/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tutorial: Your files in the Cloud with the Windows Azure Storage for WordPress plugin</title>
		<link>http://www.designisphilosophy.com/tutorials/windows-azure-storage-for-wordpress-plugin/</link>
		<comments>http://www.designisphilosophy.com/tutorials/windows-azure-storage-for-wordpress-plugin/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 16:00:09 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[WordPress on Azure]]></category>
		<category><![CDATA[azure]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=1617</guid>
		<description><![CDATA[So you have a WordPress site with a decent amount of traffic. That&#8217;s probably causing some serious pain for your server. With a lot of traffic comes a heavy server load. And most of that load is probably due to image files &#8230; <a href="http://www.designisphilosophy.com/tutorials/windows-azure-storage-for-wordpress-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So you have a WordPress site with a decent amount of traffic. That&#8217;s probably causing some serious pain for your server. With a lot of traffic comes a heavy server load. And most of that load is probably due to image files uploaded to your site.</p>
<p>The solution to this is to put your images and other media files elsewhere &#8211; most notably in some sort of CDN (Content Delivery Network) or on a cloud service.</p>
<p>In this tutorial I&#8217;ll show you how to use Windows Azure Blob storage to host all your media files from any WordPress site, whether it&#8217;s hosted on WordPress or somewhere else on the web. It&#8217;s all done with a great little plugin called the <a title="Windows Azure Storage Plugin" href="http://wordpress.org/extend/plugins/windows-azure-storage/" target="_blank">Windows Azure Storage Plugin</a> available from the WordPress Plugin Directory.</p>
<p>To follow this tutorial you need four things:</p>
<ol>
<li>A Windows Azure account (<a title="Windows Azure free trial" href="http://www.microsoft.com/windowsazure/free-trial/" target="_blank">get a free trial here</a>)</li>
<li>An Azure companion like <a title="CloudXplorer" href="http://clumsyleaf.com/products/cloudxplorer" target="_blank">CloudXplorer</a></li>
<li>A WordPress powered site hosted somewhere on the web</li>
<li>The <a title="Windows Azure Storage Plugin" href="http://wordpress.org/extend/plugins/windows-azure-storage/" target="_blank">Windows Azure Storage Plugin</a></li>
</ol>
<h2>Step 1: Set up a storage account on Windows Azure</h2>
<p>Setting up a storage account on Windows Azure is pretty straight forward. Basically you just log in to the Windows Azure Portal, click New Storage Account and follow the instructions. If you need a more detailed rundown check out my article on <a title="WordPress on Windows Azure: Single-Site Deployment" href="http://www.designisphilosophy.com/tutorials/wordpress-on-azure-single-site-deployment/" target="_blank">how to host WordPress on Windows Azure</a>, in particular step 1b.</p>
<h2>Step 2: Prepare a folder in your storage account with CloudXplorer</h2>
<p>What we&#8217;re going to do is redirect all the files uploaded from WordPress to be stored in the Windows Azure Blob instead of in the regular location (which is under wp-content/uploads). To do this we first have to create a folder under the Windows Azure Storage Account that we can direct the files to. Because Windows Azure is a cloud service, the folder system cannot be accessed like you would if it were an FTP server. Instead we have to use a cloud companion to get access to the space and create the folder. <a title="CloudXplorer" href="http://clumsyleaf.com/products/cloudxplorer" target="_blank">CloudXplorer</a> is a free companion for Windows that will help  you do exactly that.</p>
<p>After setting up your Windows Azure Storage Account and installing CloudXplorer, go to the Windows Azure portal and find and copy the Primary Access Key for your storage account by clicking the button in the right hand column:</p>
<p><img class="aligncenter size-full wp-image-1609" title="Primary Access Key" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/accesskey.jpg" alt="Primary Access Key" width="214" height="117" /></p>
<p>Now open CloudXplorer and click File -&gt; Manage Accounts. This brings up a new dialog. From here click New and pick Windows Azure account:</p>
<p><img class="aligncenter size-full wp-image-1619" title="Create new Azure account" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/newaccount.jpg" alt="Create new Azure account" width="558" height="336" /></p>
<p>In the next dialog insert the storage account name (the one you defined when setting up the storage account) and the primary access key for the storage account:</p>
<p><img class="aligncenter size-full wp-image-1618" title="Windows Azure Account Info" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/insertkey.jpg" alt="Windows Azure Account Info" width="348" height="419" />When you are inside the new storage account, create a new directory (in Windows Azure directories are called &#8220;containers&#8221;):</p>
<p><img class="aligncenter size-full wp-image-1620" title="Create new container" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/newcontainer.jpg" alt="Create new container" width="408" height="205" />Finally, right click the new container and select Properties. From here go to Policies and set Access Control to Full public read access. Otherwise only you will be able to see the files uploaded:</p>
<p><img class="aligncenter size-full wp-image-1621" title="Change access" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/fullaccess.jpg" alt="Change access" width="361" height="458" />Now you have a folder WordPress can send files to.</p>
<h2>Step 3: Set up the Windows Azure Storage for WordPress plugin</h2>
<p>If you haven&#8217;t already done so, log in to WordPress and install and activate the <a title="Windows Azure Storage Plugin" href="http://wordpress.org/extend/plugins/windows-azure-storage/" target="_blank">Windows Azure Storage Plugin</a>. Once that&#8217;s done, go to Settings -&gt; Azure Storage to open the administration window.</p>
<p>From here you can insert the storage account name (same as before) and the Primary Access Key (also same as before). Just like with CloudXplorer this allows WordPress to talk to the Windows Azure Storage Account.</p>
<p><img class="aligncenter size-full wp-image-1622" title="settings" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/settings.jpg" alt="" width="564" height="205" />After entering the name and key, click Save. This will allow the plugin to talk to Windows Azure and when the page refreshes the Default Storage Container box will be populated with the containers (folders) in your storage account. Select the container you created using CloudXplorer and click Save again.</p>
<p><img class="aligncenter size-full wp-image-1623" title="container" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/container.jpg" alt="" width="564" height="205" />If you want to you can get fancy here and set a CNAME to mask the location of the files. If you don&#8217;t do that the URL to your files will be something like storage.windows.azure.com which isn&#8217;t all that nice or meaningful.</p>
<p>Finally, check the box at the bottom that says Use Windows Azure Storage when uploading via WordPress&#8217; upload tab. This will cause the plugin to take over the upload functions in WordPress completely and all files will now be pushed to Windows Azure. Click Save to finish the job.</p>
<p><img class="aligncenter size-full wp-image-1624" title="useasstorage" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/useasstorage.jpg" alt="" width="443" height="67" />With the settings complete, upload an image file either from Media -&gt; New or by creating a new blog post and adding an image. When the image is uploaded, check the URL and see that it&#8217;s now stored in the Windows Azure container. You can also use CloudXplorer to navigate to the container and see the files.</p>
<p>The great thing about the way this plugin is set up is that it co-opts the native media uploader function in WordPress. As a result all the regular media behaviour you find in WordPress continues as before. The only difference is you are now hosting your media files in the Windows Azure cloud with all the performance benefits that entails.</p>
<p>That is all! Try it out and report back in the comments below.</p>
<div class="addthis_toolbox addthis_default_style" addthis:url='http://www.designisphilosophy.com/tutorials/windows-azure-storage-for-wordpress-plugin/' addthis:title='Tutorial: Your files in the Cloud with the Windows Azure Storage for WordPress plugin' ><a class="addthis_button_facebook like"></a><a class="addthis_button_twitter"></a><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/windows-azure-storage-for-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress on Windows Azure: Single-Site Deployment</title>
		<link>http://www.designisphilosophy.com/tutorials/wordpress-on-azure-single-site-deployment/</link>
		<comments>http://www.designisphilosophy.com/tutorials/wordpress-on-azure-single-site-deployment/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 16:00:42 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WordPress on Azure]]></category>
		<category><![CDATA[azure]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=1510</guid>
		<description><![CDATA[UPDATE November 2, 2011: The WordPress on Azure scaffolder has been updated and a new and easier process has been introduced. In response this tutorial has been rewritten to reflect the new methods. In this step-by-step tutorial I&#8217;ll take you &#8230; <a href="http://www.designisphilosophy.com/tutorials/wordpress-on-azure-single-site-deployment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-1642" title="WordPress on Windows Azure" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/wordpressandazure.jpg" alt="WordPress on Windows Azure" width="965" height="312" /></p>
<p><strong>UPDATE November 2, 2011: The WordPress on Azure scaffolder has been updated and a new and easier process has been introduced. In response this tutorial has been rewritten to reflect the new methods.</strong></p>
<p>In this step-by-step tutorial I&#8217;ll take you through the process of publishing a single-site deployment of WordPress on Windows Azure. By &#8220;single-site deployment&#8221; I mean that you&#8217;ll be using WordPress as one single site. In contrast a Network deployment refers to a situation in which you&#8217;ll set up WordPress and then run multiple sites under it in a network.</p>
<p>A step-by-step tutorial on how to deploy WordPress Networks on Windows Azure will be posted in the near future.</p>
<h2>What you&#8217;ll need</h2>
<ul>
<li>Windows Azure account (<a title="Windows Azure free trial" href="http://www.microsoft.com/windowsazure/free-trial/" target="_blank">get a free trial here</a>)</li>
<li><a title="Windows Azure SDK" href="http://www.microsoft.com/windowsazure/sdk/" target="_blank">Windows Azure SDK</a> (total pain to install so I suggest you use <a title="Web Platform Installer" href="http://www.microsoft.com/web/downloads/platform.aspx" target="_blank">Web Platform Installer</a>)</li>
<li><a title="FileSystemDurabilityPlugin at Github" href="https://github.com/Interop-Bridges/Windows-Azure-File-System-Durability-Plugin/downloads" target="_blank">FileSystemDurabilityPlugin</a></li>
<li><a title="Windows Azure SDK for PHP" href="http://phpazure.codeplex.com/SourceControl/changeset/changes/64152" target="_blank">Windows Azure SDK for PHP</a></li>
<li><a title="PHP for Windows" href="http://windows.php.net/download/" target="_blank">PHP</a></li>
<li><a title="Windows Azure scaffolder for WordPress" href="https://github.com/Interop-Bridges/Windows-Azure-PHP-Scaffolders/tree/master/WordPress" target="_blank">WordPress on Windows Azure scaffolder tool</a></li>
<li>Optional: The plugin(s) you want to use</li>
<li>Optional: The theme(s) you want to use</li>
</ul>
<p>The two last points are optional, but it&#8217;s always a good idea to install WordPress with the plugins and theme(s) you want to use right off the bat. It saves you a bit of time later on.</p>
<p><em>Note that the following assumes you have a Windows Azure subscription. If not, go to the Windows Azure website and <a title="Windows Azure free trial" href="http://www.microsoft.com/windowsazure/free-trial/" target="_blank">get a free trial</a>.</em></p>
<h2>1. Setting up Azure</h2>
<p>The first step in deploying WordPress on Windows Azure is to set up the necessary elements in the Windows Azure environment. This is all done through the <a title="Windows Azure Management Portal" href="http://windows.azure.com" target="_blank">Windows Azure Management Portal</a> found at <a title="Windows Azure Management Portal" href="http://windows.azure.com" target="_blank">http://windows.azure.com</a>. For the deployment you&#8217;ll need a new Hosted Service, dedicated Blob storage and a database.</p>
<p><span class="Apple-style-span" style="color: #000000; font-size: 17px; line-height: 25px;">1a. Create a new Hosted Service</span></p>
<p><img class="alignright size-full wp-image-1511" title="New Hosted Service" src="http://www.designisphilosophy.com/wp-content/uploads/2011/07/hosted_service.jpg" alt="New Hosted Service" width="321" height="173" /></p>
<p>Your WordPress deployment will live in a Hosted Service on Windows Azure. You can have multiple Hosted Services under one account. To set up a new Hosted Service log into the Windows Azure Management Portal and click the New Hosted Service button in the top left corner.</p>
<p>This opens the New Hosted Service dialog where you can define the different parameters of the hosted service as seen below:</p>
<p><img class="aligncenter size-full wp-image-1512" title="New Hosted Service Dialog" src="http://www.designisphilosophy.com/wp-content/uploads/2011/07/hostedservicedialog.png" alt="New Hosted Service Dialog" width="545" height="643" /></p>
<p>Off the top you select what subscription you want the new Hosted Service to live under.</p>
<p>Next give it a name so you know what it&#8217;s about and enter a dedicated URL prefix for your application.</p>
<p><em>By default all Windows Azure applications have a URL that looks like http://something.cloudapp.net. You can change this by forwarding one of your own domains to this address. More on that later.</em></p>
<p>Under Choose a region or affinity group you define in what general geographic area the application will be used. Pick the region or affinity group that is closest to your users.</p>
<p>When setting up a new Hosted Service you can deploy an application immediately. But since we have yet to build a deployment, check Do not deploy and click OK.</p>
<p>Windows Azure now runs a process and when it is completed you should see your new Hosted Service on the list as seen below.</p>
<p><img class="aligncenter size-full wp-image-1513" title="New Hosted Service complete" src="http://www.designisphilosophy.com/wp-content/uploads/2011/07/hostedservice.png" alt="New Hosted Service complete" width="485" height="106" /></p>
<h3>1b. Create a Storage Account (Blob storage)</h3>
<p><img class="alignright size-full wp-image-1515" title="New Storage Account" src="http://www.designisphilosophy.com/wp-content/uploads/2011/07/storage.png" alt="New Storage Account" width="321" height="173" />We&#8217;ll be using a Blob Storage Account to host all the uploaded content as well as the plugins and themes so that if and when your Windows Azure deployment reboots or reimages you don&#8217;t loose all this content. To create a Storage Account click on the New Storage Account button in the top left corner.</p>
<p>This opens the Create New Storage Account dialog as seen below:</p>
<p><img class="aligncenter size-full wp-image-1516" title="Create New Storage Account dialog" src="http://www.designisphilosophy.com/wp-content/uploads/2011/07/newstorage.png" alt="Create New Storage Account dialog" width="545" height="308" />Again pick the subscription you want to host the storage under, enter a URL prefix and set the region or affinity group. Make sure to place the Storage Account in the same region or affinity group as the Hosted Service.</p>
<p>Windows Azure runs a process and when it is completed you should see your new Storage account on the list as seen below.</p>
<p><img class="aligncenter size-full wp-image-1517" title="Storage Account created" src="http://www.designisphilosophy.com/wp-content/uploads/2011/07/storagecreated.png" alt="Storage Account created" width="545" height="90" /></p>
<h3>1c. Create a Database</h3>
<p>The final step in the Windows Azure setup process is to create a database. This is where all the actual content of the WordPress site will live. This is a two step process: First you set up a new Database Server and then you set up a new database within it.</p>
<p><img class="alignright size-full wp-image-1518" title="Create New Database Server" src="http://www.designisphilosophy.com/wp-content/uploads/2011/07/createserver.png" alt="Create New Database Server" width="85" height="76" /></p>
<p>To create the new Database Server click the Database button on the lower left and click the huge Create New SQL Windows Azure Server button under Getting Started. Alternatively you can select the correct subscription and then click the Create button on the top toolbar. This opens the Create Server dialog. This is again a multi-step process.</p>
<p>First select the region (again, pick the same region you chose for the Hosted Service and Storage).</p>
<p><img class="aligncenter size-full wp-image-1519" title="Create New Server step 1" src="http://www.designisphilosophy.com/wp-content/uploads/2011/07/server1.png" alt="Create New Server step 1" width="467" height="400" /></p>
<p>On the next screen set the username and password for the server. This is the info you&#8217;ll use to interact with the databases on the server so make sure you have a copy of it somewhere. You can edit it later but it&#8217;s a big pain.</p>
<p><img class="aligncenter size-full wp-image-1520" title="Create New Database Server step 2" src="http://www.designisphilosophy.com/wp-content/uploads/2011/07/server2.png" alt="Create New Database Server step 2" width="467" height="400" /></p>
<p>The next step is interesting. You can assign custom IP addresses that are allowed to access your database directly. That&#8217;s not necessary in our case, but it could be in the future. For now just check the Allow other Windows Azure services to access this server box so WordPress can read and write to to the database. This will add a new rule with the IP range 0.0.0.0.</p>
<p><img class="aligncenter size-full wp-image-1521" title="Create New Database Server step 3" src="http://www.designisphilosophy.com/wp-content/uploads/2011/07/server3.png" alt="Create New Database Server step 3" width="467" height="400" /></p>
<p>When you click Finish, Windows Azure will create the new database server. When it&#8217;s done it will appear with a weird computer generated name on your server list as below.</p>
<p><img class="aligncenter size-full wp-image-1522" title="Create New Database Server step 4" src="http://www.designisphilosophy.com/wp-content/uploads/2011/07/server4.png" alt="Create New Database Server step 4" width="637" height="51" /></p>
<p><img class="alignright size-full wp-image-1524" title="Create New Database" src="http://www.designisphilosophy.com/wp-content/uploads/2011/07/createdatabase.png" alt="Create New Database" width="85" height="76" />With the database server set up you can now create a database for WordPress. To do this select the new database server and click the Create Database button on the top menu. This opens the Create Database dialog seen below.</p>
<p><img class="aligncenter size-full wp-image-1525" title="Create Database dialog" src="http://www.designisphilosophy.com/wp-content/uploads/2011/07/createdb.png" alt="Create Database dialog" width="441" height="243" /></p>
<p>In the dialog give the database a name (this is the name you&#8217;ll call from the WordPress config file, define the type (edition) of database you want (the options are Web and Business of which I use Web) and set the maximum size. If you&#8217;re running a single install WordPress site I&#8217;d be flabbergasted if you ever managed to get the database up to 1GB so stick with that.</p>
<p>Click OK and Windows Azure creates the database. You&#8217;ll notice that there are two databases in the server, one called Master and the one you created. This is as it should be. You can manage, drop and mess with the database you created all you want but you should leave Master alone.</p>
<h2>2. Preparing your computer for the build</h2>
<p>Before creating your WordPress on Windows Azure deployment package you need to install the <a title="Setup the Windows Azure Development Environment automatically with the Microsoft Web Platform Installer" href="http://azurephp.interoperabilitybridges.com/articles/setup-the-windows-azure-development-environment-automatically-with-the-microsoft-web-platform-installer" target="_blank">Windows Azure SDK</a>, the <a title="Download the FileSystemDurabilityPlugin from Github" href="https://github.com/Interop-Bridges/Windows-Azure-File-System-Durability-Plugin/downloads" target="_blank">File System Durability Plugin</a> and the <a title="Windows Azure SDK for PHP" href="http://phpazure.codeplex.com/SourceControl/changeset/changes/64152" target="_blank">Windows Azure SDK for PHP</a>. The Windows Azure SDK is necessary for your computer to be able to build an Windows Azure deployment package. The File System Durability Plugin does exactly what it says &#8211; ensures file system durability. This is necessary because in Windows Azure you can spin up and down several instances of the same site and we have to make sure the instances are identical all the time. The Windows Azure SDK for PHP contains the functions necessary to build custom Windows Azure deployments that depend on PHP.</p>
<p>The easiest way to install the Windows Azure SDK is to download <a title="Web Platform Installer" href="http://www.microsoft.com/web/downloads/platform.aspx" target="_blank">Web Platform Installer</a>, search for &#8220;Azure SDK&#8221; and install it using the tool. Web Platform Installer will do all the heavy lifting and configurations for you in one clean sweep. If you really want to you can also install the <a title="Windows Azure SDK" href="http://www.microsoft.com/windowsazure/sdk/" target="_blank">Windows Azure SDK</a> manually but I&#8217;m going to warn you up front that it&#8217;s a pain unless you are very familiar with IIS and other Windows obscura.</p>
<p>To install the File System Durability Plugin <a title="Download the FileSystemDurabilityPlugin from Github" href="https://github.com/Interop-Bridges/Windows-Azure-File-System-Durability-Plugin/downloads" target="_blank">download the zip file</a> from Github and extract it into the Windows Azure SDK plugins folder found at:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">C:\Program Files\Windows Azure SDK\v1.x\bin\plugins</pre></div></div>

<p>Finally to install <a title="Windows Azure SDK for PHP" href="http://phpazure.codeplex.com/SourceControl/changeset/changes/64152" target="_blank">Windows Azure SDK for PHP</a> simply download it and place the contents of the <em>trunk</em> folder somewhere on your computer. I created a folder called &#8220;Windows-Azure-SDK-for-PHP&#8221; in my Program Files folder for this. For what we are doing the SDK for PHP requires no installation, it just has to live on your computer in a place you can remember. If you want it to be a permanent feature on your computer you can <a title="Install Windows Azure SDK for PHP" href="http://azurephp.interoperabilitybridges.com/articles/setup-the-windows-azure-sdk-for-php" target="_blank">follow the instructions at this site</a> for a more advanced install.</p>
<h2>3. Creating the WordPress on Windows Azure scaffolding</h2>
<p><em>The following assumes you have already installed <a title="Windows Azure SDK" href="http://www.microsoft.com/windowsazure/sdk/" target="_blank">Windows Azure SDK</a>, the FileSystemDurabilityPlugin, Windows Azure SDK for PHP and PHP.</em></p>
<p>With Windows Azure set up it&#8217;s time to create the WordPress deployment package. This is done using a &#8220;scaffolding&#8221; tool created specifically for this purpose. The tool is baked into the <a title="Windows Azure SDK for PHP" href="http://phpazure.codeplex.com/SourceControl/changeset/changes/64152" target="_blank">Windows Azure SDK for PHP</a>. The basic idea of the scaffolding tool is that it builds the framework in which we will build and configure the final deployment package. Once the scaffolding is created we can configure and add content such as plugins and themes to the WordPress core before deploying it.</p>
<p>To make this process as easy as possible the Microsoft Interoperability Team has created a complete solution for us, available from <a title="WordPress Windows Azure scaffolder on Github" href="https://github.com/Interop-Bridges/Windows-Azure-PHP-Scaffolders/tree/master/WordPress" target="_blank">Github</a>. Download the entire package where you want to do the setup for your deployment and let&#8217;s get started.</p>
<p>The actual building of the scaffolder will be done in Command Line (Start -&gt; CMD) in Administrator mode. You can start it from the Start Menu (remember to right-click and select Run as Administrator).</p>
<p>Before running the scaffolder command you need to include the Windows Azure SDK for PHP in the system environment. This can be done by <a title="Setup the Windows Azure SDK for PHP" href="http://azurephp.interoperabilitybridges.com/articles/setup-the-windows-azure-sdk-for-php" target="_blank">tweaking your system settings</a>, but if you want a quick and easy way that leaves your system settings alone you can just configure it for the current open command line window using this command:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #b1b100; font-weight: bold;">SET</span> PATH=<span style="color: #33cc33;">%</span><span style="color: #448888;">PATH</span><span style="color: #33cc33;">%</span>;c:\PHP;C:\Program Files\Windows Azure SDK <span style="color: #00b100; font-weight: bold;">for</span> PHP\bin</pre></div></div>

<p><em>(The above assumes PHP is installed in the PHP folder on C: drive and the Windows Azure SDK for PHP is installed in the Windows Azure SDK for PHP folder under Program Files. Your command may be different depending on where you installed PHP and Windows Azure SDK for PHP.)</em></p>
<p>With the system settings changed it&#8217;s time to run the scaffolder. You can do this manually or you can use the convenient new build.bat batch file that will run the entire process for you. In command line type:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">build.bat</pre></div></div>

<p>If you&#8217;ve kept all your ducks in a row up until this point the scaffolder will now run and you&#8217;ll see a bunch of prompts in the command line window. The scaffolder sets up the entire environment you need to get WordPress to run on Windows Azure, downloads the latest version of WordPress automatically and adds a couple of very important WordPress plugins to boot. Pretty nifty.</p>
<p>When the command completes you&#8217;ll have a new folder called &#8220;build&#8221; in the same folder where build.bat was located. The build folder in turn contains three files: ServiceConfiguration.cscfg, WordPress.cspkg and WordPress.phar in addition to a folder called WordPress.</p>
<h2>4. Configuring the WordPress for deployment</h2>
<p>With the scaffolding built it&#8217;s time to configure WordPress. If you&#8217;ve ever worked published a WordPress site before you know that you need to plug in database access info and other data in the wp-config.php file before deployment for the site to hook onto the database. In the case of WordPress on Windows Azure however, that information is placed in an Windows Azure configuration file and the wp-config.php file queries this configuration file for the details. This allows you to change the configuration of the WordPress installation on the fly through the Windows Azure deployment configuration panel rather than having to redeploy every time you want to change something. The file in question is found in the build folder and is called ServiceConfiguration.cscfg. Open ServiceConfiguration.cscfg in a text editor and make the following changes as outlined below:</p>
<h3>Database info</h3>
<p><img class="aligncenter size-full wp-image-1628" title="Database setup" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/dbsetup.jpg" alt="Database setup" width="685" height="77" /></p>
<p><strong>DB_NAME</strong> is the name you set for the database, in my case &#8220;PhotoPivotDB&#8221;</p>
<p><strong>DB_USER</strong> is your Windows Azure username combined with an @ and the name of the database server as assigned by Windows Azure. The full user name looks like this: &#8220;mor10@k3b1ogbnc7&#8243;</p>
<p><strong>DB_PASSWORD</strong> is the password you defined when setting up the server.</p>
<p><strong>DB_HOST</strong> is the host name of the server combined with .database.windows.net, so for example k3b1ogbnc7.database.core.windows.net</p>
<h3>Security keys</h3>
<p>With the new build.bat file the security keys are automatically generated so you no longer have to worry about them unless you want to add more complicated encryption.</p>
<h3>FileSystemDurabilityPlugin settings</h3>
<p><a href="http://www.designisphilosophy.com/wp-content/uploads/2011/11/systemdurability.png"><img class="aligncenter size-medium wp-image-1703" title="File System Durability Plugin" src="http://www.designisphilosophy.com/wp-content/uploads/2011/11/systemdurability-506x62.png" alt="File System Durability Plugin" width="506" height="62" /></a></p>
<p>This section relates to the FileSystemDurabilityPlugin. Here you provide the access info to the Blob storage you set up earlier:</p>
<p><strong>StorageAccountName</strong> is the name you gave your storage, in my case ppwpstorage</p>
<p><strong>StorageAccountPrimaryKey</strong> you get by going to the Windows Azure portal, clicking Hosted Services, Storage Accounts &amp; CDN, selecting your storage and clicking the Primary Access Key button on the top right hand corner:</p>
<p><img class="aligncenter size-full wp-image-1609" title="Primary Access Key" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/accesskey.jpg" alt="Primary Access Key" width="214" height="117" />This opens a dialog from which you can copy the access key. It ends with two equal signs (==)</p>
<p>Leave everything else as it is.</p>
<h2>5. Create the Deployment Package</h2>
<p>The core setup is now complete and we are ready to create the deployment package. If you want to add any custom plugins or themes to your deployment, this is the time to do so. You find the plugins and themes folders under the \build\WordPress\WebRole\wp-content\ folder where you can add them by simply dropping them in. This is also where you add new or changed files when you are going to redeploy.</p>
<p>To ensure that WordPress can send administrator emails I recommend you download and add the <a title="WP Mail SMTP plugin" href="http://wordpress.org/extend/plugins/wp-mail-smtp/" target="_blank">WP Mail SMTP plugin</a>. As Windows Azure does not have a native email server you need to use an external SMTP server to handle WordPress&#8217; emails. This is further covered at the end of the article but since you&#8217;ll want the mail function to work you will save time by adding the plugin now so it&#8217;s part of your deployment package.</p>
<p>Creating the package is the final step before deploying to Windows Azure. Like with the scaffolder, the packager is run in comman line. First, navigate to the build folder where you find the WordPress.phar file. Then run the as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">package create -in=&quot;.\WordPress&quot; -out=&quot;.\package&quot; -dev=false</pre></div></div>

<p>The process runs and you should end up with a new folder called package with two files: WordPress.cspkg (named after the export folder) and ServiceConfiguration.cscfg.</p>
<h2>6. Deploying the Package</h2>
<p>To deploy the package log in to the <a title="Windows Azure Portal" href="http://windows.azure.com" target="_blank">Windows Azure Portal</a>, go to Hosted Services, Storage &amp; CDN, click Hosted Services and select the hosted service you created earlier.</p>
<p>Next click the New Production Deployment button in the upper left corner. This opens the Create a new Deployment dialog:</p>
<p><img class="aligncenter size-full wp-image-1632" title="New deployment" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/newpackage.jpg" alt="New deployment" width="553" height="396" />Give your deployment a name and point the Package location to your WordPress.cspkg file and Configuration file to ServiceConfiguration.cscfg, both in the package folder.</p>
<p>Click OK and if everything is correct you&#8217;ll get a warning like the one below. Click OK and the package will be uploaded and deployed. Because the build file will be at least 15mb in size this may take a bit of time.</p>
<p><img class="aligncenter size-full wp-image-1613" title="warning" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/warning.jpg" alt="warning" width="558" height="394" />Once the package is uploaded you have to wait for Windows Azure to do its thing. This can take quite a long time (I&#8217;ve seen it take over an hour!) You just have to be patient and wait for it to do its thing.</p>
<h2>7. Setting up WordPress on Windows Azure</h2>
<p>If everything went as planned you should see the Deployment, Role and Instance of your deployment change to Ready. If so you can click on the deployment and you&#8217;ll get the DNS name you set in step 1a (http://something.cloudapp.net). Visit this address and you&#8217;ll get the standard WordPress setup screen.</p>
<p>Here you fill out all the standard stuff like Site title, username, password and an email address. Before clicking Install WordPress, make sure you remember your username and password! As Windows Azure doesn&#8217;t have an email server WordPress will not send you an email with your username and password nor will it do so if you click the &#8220;I forgot my password button&#8221;, so be careful.</p>
<p>After hitting Install WordPress the application is installed as normal and you get to the login screen. From here we have to do a couple of extra things before we&#8217;re all set to go:</p>
<h3>7a. Set up Windows Azure Storage for WordPress</h3>
<p>WordPress normally stores all uploads in the wp-content/uploads folder and this works fine on a normal server. But Windows Azure is a virtual server environment so things don&#8217;t work the same way. This is especially true when it comes to uploads. Because your WordPress instance (or instances) on Windows Azure live on a virtual server that can be reset and re-imaged, the WordPress on Windows Azure solution has to create synced copies of the wp-content folder in Blob storage so that all instances are identical and resets are not destructive. That means if you have a ton of images or other files on your site, these will be constantly passed back and forth between your instances and Blob, and that will become costly.</p>
<p>To get around the problem the WordPress.phar file ships with an extra plugin called Windows Azure Storage for WordPress. This plugin allows you to use Blob storage to save media in your installation.</p>
<p><em>Before activating the plugin you need to assign a container in your Blob storage for your uploads. The easiest way to do this is to use a tool like <a title="ClodXplorer" href="http://clumsyleaf.com/products/cloudxplorer" target="_blank">CloudXplorer</a> and set it up manually.</em></p>
<p>To activate go to Plugins and activate Windows Azure Storage for WordPress.</p>
<p>Then go to Settings and select Windows Azure. This takes you to the configuration page for the Windows Azure Storage for WordPress plugin.</p>
<p><a href="http://www.designisphilosophy.com/wp-content/uploads/2011/10/settings1.jpg"><img class="aligncenter size-full wp-image-1636" title="WordPress Azure storage plugin setup" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/settings1.jpg" alt="WordPress Azure storage plugin setup" width="564" height="205" /></a></p>
<p>Here you need to plug in the storage account name and the access key for the storage account. I use the same storage as for WordPress itself so I just copy the info out of my ServiceConfiguration.cscfg file and paste it in. If you want to you can set up separate storage as well but it seems excessive.</p>
<p>If you want to you can define an alternate CNAME for your storage (by default the domain for your Blob storage is http://YourAccountName.blob.core.windows.net/) and even set up proxy server info. I&#8217;ll leave that for you to decide.</p>
<p>Lastly remember to check the Use Windows Azure Storage for default upload box.</p>
<p><a href="http://www.designisphilosophy.com/wp-content/uploads/2011/10/useasstorage.jpg"><img class="aligncenter size-full wp-image-1624" title="useasstorage" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/useasstorage.jpg" alt="" width="443" height="67" /></a></p>
<p>With everything set click Save changes and the plugin will connect to your storage.</p>
<p><a href="http://www.designisphilosophy.com/wp-content/uploads/2011/10/container.jpg"><img class="aligncenter size-full wp-image-1623" title="container" src="http://www.designisphilosophy.com/wp-content/uploads/2011/10/container.jpg" alt="" width="564" height="205" /></a></p>
<p>At this point the Default Storage Container filed will be populated with whatever storage containers are available in Blob storage. Pick the container you set up for your uploads using CloudXplorer and click Save changes again.</p>
<p>Now you should be ready to go. Just to make sure, go to Media, upload an image and make sure it works and that the URL points to Blob storage.</p>
<h3>7b. Set up an external SMTP server</h3>
<p>The final compulsory step in setting up WordPress on Windows Azure is to set up an alternate SMTP server for the application so it can send emails to you and others. This is important because WordPress uses emails to communicate with you about things you need to know such as new user registrations, new comments and most importantly how to retrieve your username and password when you forget.</p>
<p>Setting up an SMTP server can be done using any one of a number of plugins. We use the <a title="WP Mail SMTP plugin" href="http://wordpress.org/extend/plugins/wp-mail-smtp/" target="_blank">WP Mail SMTP plugin</a> by <a title="Callum MacDonald" href="http://www.callum-macdonald.com/code/wp-mail-smtp/" target="_blank">Callum MacDonald</a> on <a title="PhotoPivot.com - a digital lightboard for professional photographers" href="http://photopivot.com" target="_blank">PhotoPivot.com</a> and it works splendidly. The setup of this plugin is self-explanatory and should need no further elaboration except to say you can use any number of different free SMTP servers to do so including GMail, Hotmail and others.</p>
<h2>8. Extra Credit: Domain redirect</h2>
<p>Now you have a fully functional WordPress site running on Azure on the domain name http://yourchosenname.cloudapp.net. That may not be what you had in mind. Fortunately redirecting a domain to Windows Azure is very easy. There are two steps involved:</p>
<ol>
<li>Use a CNAME redirect to point your existing domain to the Windows Azure domain (so www.yourdomain.com points to yourchosenname.cloudapp.net)</li>
<li>In WordPress go to Settings -&gt; General and change WordPress address (URL) and Site address (URL) to your new domain name.</li>
</ol>
<p>These have to be done in order and you should not change the WordPress settings until your domain fully redirects to WordPress, otherwise you won&#8217;t be able to visit your site.</p>
<h2>Appendix: Caveats</h2>
<h3>Plugin support</h3>
<p>Though running WordPress on Windows Azure is cool, there are some drawbacks, the most important of which is that not everything works as expected. WordPress itself will run fine, but many plugins cause weird problems or don&#8217;t work at all. This is especially true for a lot of form plugins. The reason for this is that WordPress on Azure uses SQL Azure even though WordPress is meant to run on MySQL. Needless to say this causes some rather bizarre problems not experienced elsewhere. That said this is a minor concern and one that can be resolved with some clever coding</p>
<h3>Service resets</h3>
<p>Due to the nature of Windows Azure, the system will sometimes reset. There is no warning when this happens and you don&#8217;t know how long it&#8217;s going to last. The way around this is to create several instances of your site. That way when one goes down the other one stays up.</p>
<h3>Bleeding edge means weird problems</h3>
<p>Running WordPress on Windows Azure is an interesting experience. Having created hundreds of WordPress sites on many different servers I can tell you I&#8217;ve experienced things on Windows Azure I&#8217;ve never seen before, and a lot of it I can&#8217;t explain. However most of these issues have been worked out and what we have now is a stable and solid release. Even so I must warn that by doing this you are entering into the world of extreme bleeding edge scenarios so expect the unexpected!</p>
<h2>Good luck and report back!</h2>
<p>Now you have the complete algorithm to get WordPress up and running on Windows Azure. The only thing left is to try it for yourself. And once you&#8217;re up, report back in the comments below and tell the world how it went, what happened and if you ran into any weirdness along the way. I&#8217;d love to hear from you and see what you&#8217;re doing so don&#8217;t be a stranger! You may also want to check out the <a title="Github forums for the PHP on Windows Azure scaffolding tool" href="https://github.com/Interop-Bridges/Windows-Azure-PHP-Scaffolders/issues" target="_blank">Github forums for the scaffolding tool</a> to see what other people are doing with this solution.</p>
<div class="addthis_toolbox addthis_default_style" addthis:url='http://www.designisphilosophy.com/tutorials/wordpress-on-azure-single-site-deployment/' addthis:title='WordPress on Windows Azure: Single-Site Deployment' ><a class="addthis_button_facebook like"></a><a class="addthis_button_twitter"></a><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/wordpress-on-azure-single-site-deployment/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>WordPress 3: Building Child Themes &#8211; new course at Lynda.com</title>
		<link>http://www.designisphilosophy.com/tutorials/wordpress-3-building-child-themes-new-course-at-lynda-com/</link>
		<comments>http://www.designisphilosophy.com/tutorials/wordpress-3-building-child-themes-new-course-at-lynda-com/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 16:00:59 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Lynda.com]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[child themes]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=1488</guid>
		<description><![CDATA[Child Themes are by far the easiest way of creating a new look and introduce new functionality to a WordPress powered site. By creating a WordPress child theme you get all the benefits of the parent theme while gaining the ability to &#8230; <a href="http://www.designisphilosophy.com/tutorials/wordpress-3-building-child-themes-new-course-at-lynda-com/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://farm6.static.flickr.com/5310/5874930186_c28049ab47_b.jpg"><img alt="LEGOs used as illustration for the WordPress 3: Building Child Themes course on lynda.com" src="http://farm6.static.flickr.com/5310/5874930186_c28049ab47_z.jpg" title="LEGOs used as illustration for the WordPress 3: Building Child Themes course on lynda.com" class="aligncenter" width="640" height="427" /></a>Child Themes are by far the easiest way of creating a new look and introduce new functionality to a WordPress powered site. By creating a WordPress child theme you get all the benefits of the parent theme while gaining the ability to create custom styles, custom layouts and custom functions just for you.</p>
<p>In May 2011 I went to Ventura, California to record my new course <a href="http://www.lynda.com/WordPress-3-0-tutorials/WordPress-3-Building-Child-Themes/77859-2.html">WordPress 3: Building Child Themes</a> for <a title="lynda.com - online video training" href="http://lynda.com/mor10">lynda.com</a>. The course takes you through the entire child theme building process &#8211; from picking a parent theme to creating new styles and layouts, customizing and adding menus, sidebars and footers, integrating the Featured Image (post thumbnail) functionality throughout the theme and even adding custom jQuery functions. Here&#8217;s a sneak preview:</p>
<p><iframe width="560" height="349" src="http://www.youtube.com/embed/rf6JuECR2xI" frameborder="0" allowfullscreen></iframe></p>
<p>The course and its materials were created to make it easy for everyone to get started customizing WordPress sites and comes as a direct extension to my <a href="http://www.lynda.com/WordPress-3-tutorials/essential-training/71212-2.html">WordPress 3 Essential Training</a> course (also available from <a title="lynda.com - online video training" href="http://lynda.com/mor10">lynda.com</a>). Although the course uses the <a title="Twenty Ten" href="http://wordpress.org/extend/themes/twentyten" target="_blank">Twenty Ten theme</a> as the parent theme all the code samples and techniques demonstrated can be used to build child themes from any other theme.</p>
<p>I&#8217;m very excited to announce this new course and I hope you like it too. If you&#8217;re not already a member of <a title="lynda.com - online video training" href="http://lynda.com/mor10">lynda.com</a> you can get a 7 day trial membership by visiting <a title="Get a 7 day trial for lynda.com" href="http://lynda.com/trial/rand-hendriksen" target="_blank">lynda.com/trial/rand-hendriksen</a>.</p>
<p>Go forth and start child theming!</p>
<p>&nbsp;</p>
<div class="addthis_toolbox addthis_default_style" addthis:url='http://www.designisphilosophy.com/tutorials/wordpress-3-building-child-themes-new-course-at-lynda-com/' addthis:title='WordPress 3: Building Child Themes &#8211; new course at Lynda.com' ><a class="addthis_button_facebook like"></a><a class="addthis_button_twitter"></a><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/wordpress-3-building-child-themes-new-course-at-lynda-com/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Custom Page Templates in TwentyTen</title>
		<link>http://www.designisphilosophy.com/tutorials/custom-page-templates-in-twentyten-theme/</link>
		<comments>http://www.designisphilosophy.com/tutorials/custom-page-templates-in-twentyten-theme/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 16:00:10 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[custom page template]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=1446</guid>
		<description><![CDATA[With the release of WordPress 3.1 came a new version of the stock TwentyTen theme with some subtle changes, most importantly the move of all the loop elements in the templates (the code that runs through the database and gathers &#8230; <a href="http://www.designisphilosophy.com/tutorials/custom-page-templates-in-twentyten-theme/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><iframe title="YouTube video player" width="554" height="344" src="http://www.youtube.com/embed/pvzx9k61X1M" frameborder="0" allowfullscreen></iframe><br />
With the release of WordPress 3.1 came a new version of the stock TwentyTen theme with some subtle changes, most importantly the move of all the loop elements in the templates (the code that runs through the database and gathers info like title, date, author, categories, content, images etc) into their own files. In the first release of TwentyTen this was restricted to just the single post view (loop in loop-single.php) but now it also extends to among other files the page tempalte (loop-page.php).</p>
<p>The problem arises when you want to create custom page templates. Previously all you needed to do was copy the page.php file and make the changes you wanted in the loop. But with the new system copying the page.php file alone won&#8217;t let you make any changes to the loop, just the overall structure (header, sidebar, footer etc). To make changes to the loop you have to either copy the loop code out of loop-page.php and into your custom page template or use a conditional statement along with the is_page_template() function in the loop-page.php file to detect that a custom page template is being used and then make the changes. The video above demonstrates both approaches.</p>
<div class="addthis_toolbox addthis_default_style" addthis:url='http://www.designisphilosophy.com/tutorials/custom-page-templates-in-twentyten-theme/' addthis:title='Custom Page Templates in TwentyTen' ><a class="addthis_button_facebook like"></a><a class="addthis_button_twitter"></a><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/custom-page-templates-in-twentyten-theme/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>IE9 Pinned Sites for WordPress</title>
		<link>http://www.designisphilosophy.com/tutorials/ie9-pinned-sites-for-wordpress/</link>
		<comments>http://www.designisphilosophy.com/tutorials/ie9-pinned-sites-for-wordpress/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 23:44:28 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[ie9]]></category>
		<category><![CDATA[internet explorer]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=1433</guid>
		<description><![CDATA[With the release of Internet Explorer 9 came a new and very cool feature that can greatly enhance the user experience for frequent visitors and also increase exposure for sites that activate it. The feature is called Pinned Sites and &#8230; <a href="http://www.designisphilosophy.com/tutorials/ie9-pinned-sites-for-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.designisphilosophy.com/wp-content/uploads/2011/04/pinnedsites3.jpg"><img src="http://www.designisphilosophy.com/wp-content/uploads/2011/04/pinnedsites3.jpg" alt="Design Is Philosophy pinned sites functionality" title="Design Is Philosophy pinned sites functionality" width="550" class="aligncenter size-full wp-image-1443" /></a>With the release of Internet Explorer 9 came a new and very cool feature that can greatly enhance the user experience for frequent visitors and also increase exposure for sites that activate it. The feature is called Pinned Sites and lets you turn any website or even web page into a customized pinned item on the Windows 7 toolbar.</p>
<p>What I like about this feature is that it runs of non-intrusive meta tags and JavaScript so that although it only works in IE9, it doesn&#8217;t interfere with other browsers. It becomes a value added experience for IE9 users but it doesn&#8217;t take anything away from people who do not use IE9 or don&#8217;t have Windows 7 as their operating system. Progressive enhancement I believe they call it</p>
<p>Last Saturday I did an <a title="Friends upgrade friends to IE9" href="http://www.designisphilosophy.com/events/speaking-engagements-events/friends-upgrade-friends-to-ie9/">hour long demo of this feature</a> and how to build it into a WordPress site. The example in question was this very site and now I&#8217;m going to show you how you can make  your own WordPress site pinnable too.</p>
<h2>Pinned Sites and why they matter</h2>
<p>So what is a Pinned Site in IE9? The idea is simple: You open a site in IE9, grab the tab for that site and pull it down to your Windows 7 task bar. If the site is pinnable it will dock onto the taskbar with a custom icon like you see in the grab above. When the user then clicks the icon, a custom IE9 window will open just for this site. The size and even element colour of that window can be defined by the site owner. The result is that the website becomes more like a native application on the computer and this in turn leads to increased stick time (<a title="Huffington Post gets 49% higher stick time with IE9 Pinned Sites" href="http://windowsteamblog.com/ie/b/ie/archive/2011/02/17/economics-of-the-web-ie9-users-that-pin-huffington-post-spend-49-more-time-on-site.aspx">49% for the Huffington Post</a>), more exposure and higher returning visitor rates. Whether you like IE9 or think it&#8217;s the worst thing since sushi falvoured gum the reality is site owners will benefit from this functionality. But I digress.</p>
<h2>Making your site pinnable</h2>
<p>To set up basic pinned site functionality you need a high quality favicon and access to your theme files. If you have both you&#8217;re good to go.</p>
<p>Because the pinned icons on the taskbar are larger than the regular ones I recommend using <a title="X Icon Editor" href="http://www.xiconeditor.com/">X-Icon Editor</a> (free online tool) to generate the icon and create it for all four standard sizes (64&#215;64, 32&#215;32, 24&#215;24 and 12&#215;12). I also recommend creating it from a high quality and high contrast PNG file so it looks nice regardless of the background.</p>
<p>Once  you have the favicon.ico file save it to your current theme folder so it lives alongside index.php and all the other files. Once that&#8217;s done it&#8217;s time to crack open header.php in your theme folder and get to work.</p>
<p>To get the favicon to work add the following code right before the end head tag:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;shortcut icon&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo get_bloginfo('template_url') ?&gt;</span></span>/favicon.ico&quot; /&gt;</pre></div></div>

<p>Assuming you placed the favicon.ico file in the root of your theme folder this will automatically add it as a favicon for all browsers, even really old ones. Note that if you already have a link with rel set to shortcut icon like this you&#8217;ll create a mess. You should only have one favicon link in your theme, but most WordPress themes including TwentyTen don&#8217;t have one so you should be fine.</p>
<p>Next, to make the site pinnable we&#8217;re going to add five meta tags directly underneath:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;application-name&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Your Site Name&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msapplication-tooltip&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Tooltip message&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msapplication-starturl&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.YourSite.com&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msapplication-window&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;width=600;height=600&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msapplication-navbutton-color&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#colour&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>The above code is pretty self explanatory. Just swap out the content values with your own preference. The msapplication-window tag controls the size of the custom IE9 window that opens when you click the button.. The msapplication-navbutton-color tag controls the colour of the navigation buttons in the window as in the image above.</p>
<p>With the favicon code and these five meta tags included in your header your site will be pinnable. That really is all there is to it. But you can do a lot more!</p>
<h2>Adding Jump Lists</h2>
<p><img class="alignright size-full wp-image-1434" title="Pinned Sites" src="http://www.designisphilosophy.com/wp-content/uploads/2011/04/pinnedSites1.jpg" alt="Pinned Sites" width="290" height="405" />If you look at the image to the right you&#8217;ll see there are two custom links in the jump list (right-click on the icon) for my pinned site under Tasks: Code of Ethics and Mor10 on Twitter. These are generated with an additional custom meta tag as below:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msapplication-task&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;name=Link Name;action-uri=http://www.YourSite.com/YourLink.html;icon-uri=http://www.YourSite.com/custom.ico&quot;</span><span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>Again it&#8217;s pretty straight forward: You just insert your own content and links in the name, action-uri and icon-uri variables and you&#8217;re good to go. I placed all my custom icons in the images folder under my theme and used a dynamic link for them. For the Twitter link my meta tag looked like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msapplication-task&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;name=Mor10 on Twitter;action-uri=http://www.twitter.com/mor10;icon-uri=&lt;?php echo get_bloginfo('template_url') ?&gt;</span></span>/images/twitter.ico&quot;/&gt;</pre></div></div>

<h2>Adding dynamic Custom Jump Lists displaying the latest 5 WordPress posts</h2>
<p>Adding static links is all well and good, but the Pinned Sites functionality also allows you to add custom Jump Lists. This is done through JavaScript. The basic function, which is still static, looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript&quot;</span>&gt;</span>
	function AddJumpList()	{
		try	{
			if (window.external.msIsSiteMode())	{
				window.external.msSiteModeCreateJumplist(&quot;Custom Jumplist Title&quot;);
&nbsp;
				window.external.msSiteModeAddJumpListItem(&quot;Title&quot;, &quot;http://www.YourSite.com/link&quot;, &quot;http://www.YourSite.com/custom.ico&quot;);
&nbsp;
				window.external.msSiteModeShowJumplist();
			}
		}
		catch (error)
		{
		}
	}
	AddJumpList();
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>Unlike the meta tags before this is straight up JavaScript which means all browsers will try to run it even if they don&#8217;t support the function. For this reason I&#8217;ve added a conditional feature detection script that makes sure the browser supports msIsSiteMode before running it.</p>
<p>To add new items in the Custom Jump List you just copy and paste the window.external.msSiteModeAddJumpListItem() function and change the title, link and icon attributes.</p>
<p>But that&#8217;s just static lists. For this feature to be meaningful it needs to have dynamic lists that show the most recent posts from the site, right? For that we&#8217;re going to use some hard coded PHP and a custom WordPress loop to create the jump list items dynamically. That loop looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000088;">$featuredPosts</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$featuredPosts</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;showposts=5&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$featuredPosts</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$featuredPosts</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		window.external.msSiteModeAddJumpListItem(&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;, &quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;, &quot;http://www.YourSite.com/custom.ico&quot;);
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>As you can see it&#8217;s a simple WP_query that calls the 5 most recent posts and then uses the title and permalink attributes to populate the jumplist. Just to state the obvious: You can use any query you want to poll any content you want here. You don&#8217;t have to stick with my boring loop.</p>
<p>With this custom loop inserted the full Dynamic Custom Jump List function looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript&quot;</span>&gt;</span>
	function AddJumpList()	{
		try	{
			if (window.external.msIsSiteMode())	{
				window.external.msSiteModeCreateJumplist(&quot;New Posts&quot;);
&nbsp;
				<span style="color: #009900;">&lt;?php</span>
<span style="color: #009900;">					$featuredPosts <span style="color: #66cc66;">=</span> new WP_Query<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #009900;">					$featuredPosts-&gt;</span>query(&quot;showposts=5&quot;);
&nbsp;
					while ($featuredPosts-&gt;have_posts()) : $featuredPosts-&gt;the_post(); ?&gt;
						window.external.msSiteModeAddJumpListItem(&quot;<span style="color: #009900;">&lt;?php the_title<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; ?&gt;</span>&quot;, &quot;<span style="color: #009900;">&lt;?php the_permalink<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> ?&gt;</span>&quot;, &quot;<span style="color: #009900;">&lt;?php echo get_bloginfo<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'template_url'</span><span style="color: #66cc66;">&#41;</span> ?&gt;</span>/images/news.ico&quot;);
&nbsp;
					<span style="color: #009900;">&lt;?php endwhile; ?&gt;</span>
&nbsp;
				window.external.msSiteModeShowJumplist();
			}
		}
		catch (error)
		{
		}
	}
&nbsp;
	AddJumpList();
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>Assuming you have an icon named news.ico in the images folder under your current theme this code produces a dynamic custom jump list displaying the titles of your five most recent posts, each with an icon, that points directly to that post.</p>
<p>Cool? I think so. Now pin my site and add the functionality to your own!</p>
<div class="addthis_toolbox addthis_default_style" addthis:url='http://www.designisphilosophy.com/tutorials/ie9-pinned-sites-for-wordpress/' addthis:title='IE9 Pinned Sites for WordPress' ><a class="addthis_button_facebook like"></a><a class="addthis_button_twitter"></a><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/ie9-pinned-sites-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add a Twitter-like &#8220;Published X Days Ago&#8221; timestamp to your WordPress posts</title>
		<link>http://www.designisphilosophy.com/tutorials/add-a-twitter-like-timestamp-to-your-wordpress-posts/</link>
		<comments>http://www.designisphilosophy.com/tutorials/add-a-twitter-like-timestamp-to-your-wordpress-posts/#comments</comments>
		<pubDate>Sat, 19 Feb 2011 02:01:29 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[custom code]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=1366</guid>
		<description><![CDATA[For the last couple of weeks I&#8217;ve been working on a massive WordPress project that has required a lot of interesting and unusual components that step well outsie of what is normally expected from WordPress and its plugins. Once the &#8230; <a href="http://www.designisphilosophy.com/tutorials/add-a-twitter-like-timestamp-to-your-wordpress-posts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For the last couple of weeks I&#8217;ve been working on a massive WordPress project that has required a lot of interesting and unusual components that step well outsie of what is normally expected from WordPress and its plugins. Once the project is live I&#8217;ll write a longer article about all these components, but in the meantime I&#8217;m going to share some of the functions because I think you might find them useful.</p>
<h2>&#8220;Published X Days Ago&#8221;</h2>
<p>The first function I&#8217;ll feature is a small script that spits out a text telling the viewer how long ago a post was posted. I actually needed this script for a countdown so mine is a fair bit longer, but it can be used to create a Twitter-like time stamp just as easily.</p>
<p>To achieve this we&#8217;ll be using two functions, <a title="Full breakdown of the date() function" href="http://php.net/manual/en/function.date.php" target="_blank">date()</a> and <a title="Full breakdown of the get_the_time() function" href="http://codex.wordpress.org/Function_Reference/get_the_time" target="_blank">get_the_time()</a>. The former is a bona fide PHP function that grabs the current local time from the server while the latter is a WordPress function that grabs the time of publishing for the post.</p>
<p>It doesn&#8217;t take a genius to figure out how we&#8217;re going to use these two: Taking the current time and subtracting the published time will give you the time difference, in other words how long ago the post was published. The challenge is that you need to get the right time formats to actually output a rational result.</p>
<h2>Getting the right kind of time</h2>
<p>You&#8217;d think that if you want to count how many days ago a post was posted you could just grab the dates and count backwards. But that&#8217;s actually pretty hard because it relies on the counting mechanism knowing what day of the month it is and how many days each month has etc etc. A better solution is to grab a unified time value that doesn&#8217;t change in the same arbitrary way. Luckily programmers found this problem and its solution a long long time ago. It is called the the Unix Epoch and is the time, in seconds, since January 1, 1970 00:00:00 GMT). To get this value for each of our functions we simply add in the format string &#8220;U&#8221; like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'U'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// outputs the current date and time in Unix Epoch terms</span>
get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'U'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// outputs the publishing date and time in Unix Epoch terms</span></pre></div></div>

<h2>Making the time make sense</h2>
<p>Problem is this produces a weird long number like 6250458. This is the number of seconds since the article was published. We want the number of days, so we need to do some math.</p>
<p>If you have seconds and you want to make days you first have to divide them by 60 to make minutes, then divide it by 60 again to make hours and then finally divide it by 24 to make days. For 86399 out of every 86400 seconds of the day this will produce an integer (number with a comma) but we want whole numbers. So we utilize an extra function called <a href="http://php.net/manual/en/function.round.php" title="Full breakdown of the round() function" target="_blank">round()</a> that rounds out the number for us.</p>
<h2>Putting it together</h2>
<p>With that we have all the components we need to get the number of days since published. In PHP form the function looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
	<span style="color: #000088;">$days</span> <span style="color: #339933;">=</span> <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'U'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'U'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Published &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$days</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; days ago&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>This will output the number of days since published sandwhiched between the words &#8220;Published&#8221; and &#8220;days ago&#8221;. But what about the first day, when the number is zero, or the second day when the number is one? &#8220;Published 0 days ago&#8221; and &#8220;Publised 1 days ago&#8221; looks kind of sloppy, no? Well, it&#8217;s easy to fix with some conditional statements:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
	<span style="color: #000088;">$days</span> <span style="color: #339933;">=</span> <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'U'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'U'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$days</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Published today&quot;</span><span style="color: #339933;">;</span> 
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$days</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Published yesterday&quot;</span><span style="color: #339933;">;</span> 
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Published&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$days</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; days ago&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>All these conditional statements do is ask &#8220;if the number of days is 0, say &#8220;Published today&#8221;, if the nuber is 1, say &#8220;Published yesterda&#8221; and for all other cases say &#8220;Published X days ago&#8221;.</p>
<p>Copy this piece of code anywhere in your theme files within the WordPress Loop and it&#8217;ll spit out a published x days ago timestamp on your posts.</p>
<p>Easy as Pi.</p>
<div class="addthis_toolbox addthis_default_style" addthis:url='http://www.designisphilosophy.com/tutorials/add-a-twitter-like-timestamp-to-your-wordpress-posts/' addthis:title='Add a Twitter-like &#8220;Published X Days Ago&#8221; timestamp to your WordPress posts' ><a class="addthis_button_facebook like"></a><a class="addthis_button_twitter"></a><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/add-a-twitter-like-timestamp-to-your-wordpress-posts/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>WordCamp Victoria Presentation: 10 Theme Hacks to Improve Your Site</title>
		<link>http://www.designisphilosophy.com/tutorials/wordcamp-victoria-presentation-10-theme-hacks-to-improve-your-site/</link>
		<comments>http://www.designisphilosophy.com/tutorials/wordcamp-victoria-presentation-10-theme-hacks-to-improve-your-site/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 21:47:24 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Speaking Engagements]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[wordcamp]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=1328</guid>
		<description><![CDATA[Above is the slide deck for my WordCamp Victoria presentation entitled &#8220;10 WordPress Theme Hacks to Improve Your Site&#8221;. Unlike my regular presentation this one is entirely slides based which means if you just read the slides, you&#8217;ll get the &#8230; <a href="http://www.designisphilosophy.com/tutorials/wordcamp-victoria-presentation-10-theme-hacks-to-improve-your-site/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><object id="__sse6664129" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="450" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=wordcampvictoria-110122121803-phpapp01&amp;stripped_title=10-wordpress-theme-hacks-to-improve-your-site&amp;userName=mor10" /><param name="name" value="__sse6664129" /><param name="allowfullscreen" value="true" /><embed id="__sse6664129" type="application/x-shockwave-flash" width="550" height="450" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=wordcampvictoria-110122121803-phpapp01&amp;stripped_title=10-wordpress-theme-hacks-to-improve-your-site&amp;userName=mor10" name="__sse6664129" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
Above is the slide deck for my WordCamp Victoria presentation entitled &#8220;10 WordPress Theme Hacks to Improve Your Site&#8221;. Unlike my regular presentation this one is entirely slides based which means if you just read the slides, you&#8217;ll get the gist of it. Below are all my code examples along with links to further information, example sites and related tutorials to give you some context. Knock yourself out!</p>
<h2>Replace Site Title with a Linked Image</h2>
<p>This is my number one pet peeve. When people visit a site they intuitively expect the logo or header image to be a link back to the home page, and it should be. When it&#8217;s not they (and I) get annoyed. Making your header image link back to your home page is not hard. All you have to do is wrap the header image code in a simple anchor tag that leads back to your root URL and you&#8217;re good to go. For simplicity the code looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>a title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&amp;lt;?php get_bloginfo( 'name' ); ?&amp;gt;&quot;</span> rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;home&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&amp;lt;?php echo home_url( '/' ); ?&amp;gt;&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
… the image code …
&nbsp;
<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span></pre></div></div>

<p>For a more in-depth explanation check out the tutorial <a href="http://www.designisphilosophy.com/24-days-of-wordpress/day-3-twentyten-header-image-as-home-button/" title="TwentyTen Header Image as Home Button" target="_blank">Twentyten Header Image as Home Button</a>.</p>
<h2>Enable WordPress 3 Custom Menus</h3>
<p>The WordPress 3 custom menu function is built into the TwentyTen theme and most newer themes, but older themes usually just have hard-coded menus. Adding WP 3 custom menus to a theme is not hard though. It requires a function call in the functions.php file and a template tag in the template file of your choice (usually header.php and/or footer.php). Here&#8217;s that code:</p>
<p>In functions.php:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">register_nav_menus<span style="color: #009900;">&#40;</span>
        <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                <span style="color: #0000ff;">'menuName'</span> <span style="color: #339933;">=&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Menu Name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                <span style="color: #0000ff;">' primary'</span> <span style="color: #339933;">=&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Primary Menu'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                <span style="color: #0000ff;">'2ndMenu'</span> <span style="color: #339933;">=&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'2nd Menu'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Where menuName is the identifying slug for WordPress and Menu Name is the actual displayed name in WordPress Admin.</p>
<p>To display a menu you can either call it based on the slug:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
        wp_nav_menu<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                <span style="color: #0000ff;">'theme_location'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'primary'</span>
        <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>&#8230; or the name defined in the Menus admin area:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
        wp_nav_menu<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                 <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Menu Name'</span>
        <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h2>Menus Outside the Box</h2>
<p>Menus don&#8217;t have to be regular boring one or two word one-line elements. Because WordPress allows HTML in the Navigation Label you can add more interesting designs like we did on the <a href=http://vancouverphotomarathon.com/" title="12x12 Vancouver Photo Marathon" target="_blank">12&#215;12 Vancouver Photo Marathon</a> site. On this site we added a simple span tag around the text that displays under the menu heading and then used CSS to change how it displays. Sorry, no code examples &#8211; it&#8217;s just straight up CSS and out of context it makes no sense.</p>
<h2>WordPress 3 Custom Background Images and Colours</h2>
<p>The TwentyTen theme introduced a very cool custom background function built right into the admin interface (under Appearance -> Background). This is not a function found in TwentyTen but a core function found in WordPress. That means you can activate it in any theme. All you have to do is call it from the functions.php file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_custom_background<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The function injects CSS style code right into the HTML pages which means it&#8217;ll override your theme CSS file no matter what. That in turn is why it&#8217;ll work on any theme as long as you run WordPress 3.0 or higher.</p>
<h2>Adding Featured Image (post-thumbnail) Functionality</h2>
<p>Featured images are great, if you know how to use them. They also do way more than just displaying thumbnails (which is why I think the function should be renamed). To activate the function add the following code to your functions.php file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_theme_support<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post-thumbnails'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This will add the function to you Admin panel. To display the featured image (in the size you want) in your theme use one of the following functions:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Variations:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thumbnail'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'medium'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'large'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>nnn<span style="color: #339933;">,</span>nnn<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h2>Custom Page Templates</h2>
<p>Custom page templates allow you to individualize the look of different pages on your site. They can be used to create <a href="http://reeltimevideoworks.com/" title="Reeltime Videoworks front page" target="_blank">custom front pages</a>, <a href="http://www.frugalbits.com/editorial-policy/" title="Frugalbits legal pages" target="_blank">differentiated legal pages</a> or even <a href="http://www.frugalbits.com/cheap-sheet/" title="Frugalbits Cheap Sheet page" target="_blank">custom query pages</a> that pull in posts from multiple categories.</p>
<p>A custom page template is basically a regular page template with a commented out tag at the very top that looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">/* Template Name: Whatever */</span> 
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h2>Custom Category Templates</h2>
<p>Custom category templates can be used to create differentiated category index sections in a site. Some good examples are the <a href="http://reeltimevideoworks.com/category/videos/" title="Reeltime Videoworks show reel" target="_blank">Reeltime Videoworks show reel page</a> and <a href="http://reeltimevideoworks.com/category/testimonials/" title="Reeltime Videoworks Testimonials" target="_blank">testimonials page</a> and <a href="http://designschooledkids.com/category/press/" title="Design Schooled Kids press page" target="_blank">Design Schooled Kids&#8217; press page</a>.</p>
<p>A custom category template can be made in one of two ways. Either create a file with the name category-ID.php where ID is the ID number of the category or category-slug.php where slug is the slug for the category. These files will automatically become the category tempaltes for the defined categories.</p>
<h2>Custom Header, Sidebar and Footer</h2>
<p>You can also create custom headers, sidebars and footers sort of the same way. You make and call them the same way. For example if you want a custom header you create a new header file called header-custom.php and then call it using the standard get_header() function with a small difference:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> get_header<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'custom'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>where &#8216;custom&#8217; can be anything.</p>
<h2>Better Context Links</h2>
<p>One of the things that bug me about standard WordPress themes is that they display links to the next and previous posts in the single post view. These links don&#8217;t really provide a lot of value. Instead you should be displaying the two latest posts from the current category. So I made a small theme add-in you can dump into your theme for some better context. The add-in adds links to the two latest posts in the current category including the title, publishing date and short description. To install it download the <a href="http://designisphilosophy.com/themes/related.php" title="Related.php" target="_blank">related.php file here</a> (right-click and choose &#8220;Save As&#8221; &#8211; it&#8217;s a straight up php file), add it to your theme directory and call it using the following code in your single.php file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> get_template_part<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'related'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>That&#8217;s all you have to do.</p>
<div class="addthis_toolbox addthis_default_style" addthis:url='http://www.designisphilosophy.com/tutorials/wordcamp-victoria-presentation-10-theme-hacks-to-improve-your-site/' addthis:title='WordCamp Victoria Presentation: 10 Theme Hacks to Improve Your Site' ><a class="addthis_button_facebook like"></a><a class="addthis_button_twitter"></a><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/wordcamp-victoria-presentation-10-theme-hacks-to-improve-your-site/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Why I Use Expression Web (And Why You Should Too)</title>
		<link>http://www.designisphilosophy.com/microsoft-expression-web/why-i-use-expression-web-and-why-you-should-too/</link>
		<comments>http://www.designisphilosophy.com/microsoft-expression-web/why-i-use-expression-web-and-why-you-should-too/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 17:00:56 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Expression Web]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=1318</guid>
		<description><![CDATA[As you can see from the sidebar of this blog, my main areas of expertise lie in WordPress and Expression Web. The truth of the matter is for me the two are intrinsically linked: I use Expression Web to make &#8230; <a href="http://www.designisphilosophy.com/microsoft-expression-web/why-i-use-expression-web-and-why-you-should-too/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/16711460?title=0&amp;byline=0&amp;portrait=0" width="550" height="345" frameborder="0"></iframe><br />
As you can see from the sidebar of this blog, my main areas of expertise lie in WordPress and Expression Web. The truth of the matter is for me the two are intrinsically linked: I use Expression Web to make WordPress do my bidding. To that people often ask me &#8220;Why?&#8221;. &#8220;Why do you use Expression Web and not one of the more established web development platforms (i.e. Dreamweaver)?&#8221;</p>
<p>To answer this question I wrote an article for the QUE blog entitled <a title="Why I use Expression Web and why you should too" href="http://www.quepublishing.com/articles/article.aspx?p=1657658" target="_blank">Why I Use Expression Web (And Why You Should Too)</a>. To go with the article I also created a short video demonstrating the lightning fast CSS abilities of Expression Web. I find that it&#8217;s easier to show this technique than try to explain it.</p>
<p>Once you&#8217;ve finished watching the video I urge you to <a title="Why I use Expression Web and why you should too" href="http://www.quepublishing.com/articles/article.aspx?p=1657658" target="_blank">jump over to the QUE blog and read my article</a>. I really do think you should start using Expression Web too (and no, I&#8217;m not being paid to say that).</p>
<div class="addthis_toolbox addthis_default_style" addthis:url='http://www.designisphilosophy.com/microsoft-expression-web/why-i-use-expression-web-and-why-you-should-too/' addthis:title='Why I Use Expression Web (And Why You Should Too)' ><a class="addthis_button_facebook like"></a><a class="addthis_button_twitter"></a><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/microsoft-expression-web/why-i-use-expression-web-and-why-you-should-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Day 24: Vidunder &#8211; a Free WordPress theme just for you</title>
		<link>http://www.designisphilosophy.com/tutorials/vidunder-a-free-wordpress-theme-just-for-you/</link>
		<comments>http://www.designisphilosophy.com/tutorials/vidunder-a-free-wordpress-theme-just-for-you/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 16:00:19 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[24 Days of WordPress]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WordPress Themes]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=1231</guid>
		<description><![CDATA[I promised something big, and here it is. On this 24th and Last Day of WordPress (for 2010 at least) I give you the new Vidunder WordPress theme that you see running on this very blog. Download Vidunder right here! &#8230; <a href="http://www.designisphilosophy.com/tutorials/vidunder-a-free-wordpress-theme-just-for-you/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://farm6.static.flickr.com/5282/5287074999_d70a037605_b.jpg"><img class="alignright" title="Vidunder" src="http://farm6.static.flickr.com/5282/5287074999_d70a037605.jpg" alt="" width="272" height="500" /></a>I promised something big, and here it is. On this 24th and Last Day of WordPress (for 2010 at least) I give you the new Vidunder WordPress theme that you see running on this very blog.</p>
<p><a title="Download the Vidunder WordPress theme here" href="http://designisphilosophy.com/themes/vidunder.zip" target="_blank">Download Vidunder right here!</a></p>
<h2>More customization than you&#8217;ll ever need</h2>
<p>Vidunder (means &#8220;wonder&#8221; in Norwegian) is a Twentyten child theme that takes what Twentyten does and builds on it. There are so many customization options in this theme it&#8217;s hard to list them all but here are the highlights:</p>
<h3>Custom colours</h3>
<p>The colour scheme of Vidunder is by default orange. But you can change it to any colour you want. Simply go to Appearance -&gt; Background and change the colour. This will change the background colour as well as the link colours and some other elements.</p>
<h3>Custom logo</h3>
<p>To change the logo go to Appearance -&gt; Header and upload your own. The logo is 87 x 87px and if you want a transparent logo like the one you&#8217;re seeing here you need to upload a PNG of exactly that size. If you don&#8217;t care about transparency you can upload any image file and WordPress will help crop it to size for you.</p>
<h3>Twitter updates in the header</h3>
<p><img class="alignright size-full wp-image-1232" title="twitter" src="http://www.designisphilosophy.com/wp-content/uploads/2010/12/twitter.jpg" alt="" width="339" height="105" />To activate Twitter updates in the header go to Settings -&gt; General, scroll to the bottom and enter your Twitter handle. The theme will go to Twitter, get your latest tweet and display it in the header for you.</p>
<h3>Custom header image</h3>
<p>Using the Appearance -&gt; Background setting you can also upload a custom header image of your choosing. This is independent of the custom colours.</p>
<h3>Custom Author Box</h3>
<div id="attachment_1240" class="wp-caption alignleft" style="width: 577px"><a href="http://www.designisphilosophy.com/wp-content/uploads/2010/12/author.jpg"><img class="size-full wp-image-1240" title="Custom Author Box and Related Posts" src="http://www.designisphilosophy.com/wp-content/uploads/2010/12/author.jpg" alt="" width="567" height="489" /></a><p class="wp-caption-text">Custom Author Box and Related Posts</p></div>
<p>To display the Custom Author Box underneath single posts go to Users -&gt; My Profile and define your name, email address, website, bio and Twitter handle (yes, Twitter handle). The author box will grab your Gravatar and display it along with your info. If you don&#8217;t have a bio defined the Custom Author Box will not show.</p>
<h3>Related Posts</h3>
<p>If there are two or more posts in the current category the two latest ones will be displayed under the current post. The Custom Author Box and the Related Posts box can be hidden by the viewer by clicking the Hide button in the top right corner.</p>
<h3>Sidebars Gallore</h3>
<p>The theme features 9 widgetized areas. In addition to the standard twentyten areas there is Custom which is a full-width area jammed up against the header. You can see it displaying the graphic ads for my books and video series here. Use it with causion. In addition there are Left and Right. Experiment at your own leisure.</p>
<h2>And last, but not least&#8230;</h2>
<p><a title="Download the Vidunder WordPress theme here" href="http://designisphilosophy.com/themes/vidunder.zip" target="_blank">Download Vidunder right here!</a></p>
<p>God Jul og Godt Nytt År!</p>
<p>Now go install Vidunder, mess around with the settings and get your WordPress site going for the new year!</p>
<div class="addthis_toolbox addthis_default_style" addthis:url='http://www.designisphilosophy.com/tutorials/vidunder-a-free-wordpress-theme-just-for-you/' addthis:title='Day 24: Vidunder &#8211; a Free WordPress theme just for you' ><a class="addthis_button_facebook like"></a><a class="addthis_button_twitter"></a><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/vidunder-a-free-wordpress-theme-just-for-you/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

