<?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 - The Pink &#38; Yellow Media Blog &#187; WordPress Themes</title>
	<atom:link href="http://www.designisphilosophy.com/category/wordpress-themes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.designisphilosophy.com</link>
	<description>Tutorials and thoughts on Microsoft Expression, CSS and WordPress</description>
	<lastBuildDate>Tue, 24 Aug 2010 16:40:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<atom:link rel='hub' href='http://www.designisphilosophy.com/?pushpress=hub'/>
		<item>
		<title>Vancouver WordPress Meetup Talk: Simple Yet Powerful WordPress Hacks</title>
		<link>http://www.designisphilosophy.com/events/vancouver-wordpress-meetup-talk-simple-yet-powerful-wordpress-hacks-20100812/</link>
		<comments>http://www.designisphilosophy.com/events/vancouver-wordpress-meetup-talk-simple-yet-powerful-wordpress-hacks-20100812/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 00:30:41 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Speaking Engagements]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[WordPress as CMS]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=861</guid>
		<description><![CDATA[Below you&#8217;ll find the code examples for my Vancouver WordPress Meetup group talk Simple Yet Powerful WordPress Hacks held on August 12, 2010. This article will be expanded after the talk but for now it consists only of the code examples themselves. Replace blog title with a linked image One of my top 10 pet [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/' rel='bookmark' title='Permanent Link: Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation'>Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation</a></li>
<li><a href='http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/' rel='bookmark' title='Permanent Link: Highlight current page in WordPress menus'>Highlight current page in WordPress menus</a></li>
<li><a href='http://www.designisphilosophy.com/events/speaking-about-wordpress-as-cms-at-wordcamp-whistler-what-do-you-want-me-to-cover-20090112/' rel='bookmark' title='Permanent Link: Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?'>Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Below you&#8217;ll find the code examples for my Vancouver WordPress Meetup group talk Simple Yet Powerful WordPress Hacks held on August 12, 2010. This article will be expanded after the talk but for now it consists only of the code examples themselves.</p>
<h3>Replace blog title with a linked image</h3>
<p>One of my top 10 pet peeves is sites where you can&#8217;t click the logo to get to the home page but have to click the &#8220;Home&#8221; button. This code block can be inserted in the header.php file and it will insert an image (logo) that links back to the home page and also has the alternate text and link title set to the name of the site.</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;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;blog-title&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo get_bloginfo('url') ?&gt;</span></span>/&quot; title=&quot;<span style="color: #009900;">&lt;?php bloginfo<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'name'</span><span style="color: #66cc66;">&#41;</span> ?&gt;</span>&quot; rel=&quot;home&quot;&gt;
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php bloginfo('name') ?&gt;</span></span>&quot; src=&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>/imageFolder/imageFile.type&quot; /&gt;
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<h3>Add WP 3.0 menus to non-WP 3.0 themes</h3>
<p>To add WP 3.0 menus to themes that were built before the new version of WordPress or don&#8217;t have them built in you need to activate the menu function in functions.php and then add a call to the menu in your template file.</p>
<p>Add to functions.php:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">register_nav_menus(
	array(
		'menuName' =&gt;__('Menu Name'),
		'2ndMenu' =&gt;__('2nd Menu'),
	)
);</pre></div></div>

<p>Add to template file:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php </span>
<span style="color: #009900;">	wp_nav_menu<span style="color: #66cc66;">&#40;</span>array<span style="color: #66cc66;">&#40;</span></span>
<span style="color: #009900;">		 <span style="color: #ff0000;">'theme_location'</span> <span style="color: #66cc66;">=</span>&gt;</span> 'primary'
	)); 
?&gt;</pre></div></div>

<p>Note that the theme_location call points to the name of the menu as set in functions.php. To target the menu name set inside WordPress use this code instead:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php </span>
<span style="color: #009900;">	wp_nav_menu<span style="color: #66cc66;">&#40;</span>array<span style="color: #66cc66;">&#40;</span></span>
<span style="color: #009900;">		<span style="color: #ff0000;">'name'</span> <span style="color: #66cc66;">=</span>&gt;</span> 'Menu Name'
	)); 
?&gt;</pre></div></div>

<h3>Highlight current page or category in menu</h3>
<p>I&#8217;ve already written an extensive article on this subject that can be found <a href="http://www.designisphilosophy.com/tutorials/highlight-current-page-or-category-20100809/" title="Highlight Current Page or Category in WordPress 3.0 Menus">here</a>. The core of the CSS code is this style:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">.current-menu-item,
.current-page-ancestor,
.current-post-ancestor {
	... style info goes here ...
}</pre></div></div>

<h3>Custom page template in 5 lines of code</h3>
<p>To create a custom page template simply insert the following 5 lines of code at the top of your template file and give it a name other than &#8220;whatever&#8221;. Once saved (as something other than page.php) it will appear as one of your template options inside WordPress.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php </span>
&nbsp;
<span style="color: #009900;"><span style="color: #66cc66;">/</span>* Template <span style="color: #000066;">Name</span>: Whatever *<span style="color: #66cc66;">/</span> </span>
&nbsp;
<span style="color: #009900;">?&gt;</span></pre></div></div>

<h3>Add Featured Image (thumbnail) functionality to your theme</h3>
<p>To activate the Featured Image panel in WordPress admin an enable the function you need to add a small piece of code to the functions.php file. Once this is done and Featured Images have been defined you can call them from within any template file using one of the calls below. </p>
<p>In functions.php:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">add_theme_support( 'post-thumbnails' );</pre></div></div>

<p>In theme file:</p>

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

<p>The above call will produce the thumbnail in the size defined inside WordPress admin under Settings -> Media. To call a different size use one of the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">the_post_thumbnail('thumbnail');
the_post_thumbnail('medium');
the_post_thumbnail('large');
the_post_thumbnail(array(nnn,nnn));</pre></div></div>

<p>For the last one replace &#8216;nnn&#8217; with any pixel width and height.</p>


<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/' rel='bookmark' title='Permanent Link: Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation'>Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation</a></li>
<li><a href='http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/' rel='bookmark' title='Permanent Link: Highlight current page in WordPress menus'>Highlight current page in WordPress menus</a></li>
<li><a href='http://www.designisphilosophy.com/events/speaking-about-wordpress-as-cms-at-wordcamp-whistler-what-do-you-want-me-to-cover-20090112/' rel='bookmark' title='Permanent Link: Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?'>Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/events/vancouver-wordpress-meetup-talk-simple-yet-powerful-wordpress-hacks-20100812/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MIX10 Proposal: I Reject Your Stylesheet and Substitute My Own</title>
		<link>http://www.designisphilosophy.com/microsoft-expression-web/mix10-proposal-i-reject-your-stylesheet-and-substitute-my-own-20100106/</link>
		<comments>http://www.designisphilosophy.com/microsoft-expression-web/mix10-proposal-i-reject-your-stylesheet-and-substitute-my-own-20100106/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 12:57:14 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Expression Web]]></category>
		<category><![CDATA[Speaking Engagements]]></category>
		<category><![CDATA[WordPress Themes]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=657</guid>
		<description><![CDATA[Ever since I was invited to attend Microsoft&#8217;s web design and development conference MIX in 2008 I&#8217;ve been itching to submit my own session proposal and get on the podium to share with other developers and designers my experiences working with Expression Web and WordPress. The plan was to submit a proposal for MIX09 but [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/news/2008-weblog-awards-finalist-20090102/' rel='bookmark' title='Permanent Link: 2008 Weblog Awards Finalist'>2008 Weblog Awards Finalist</a></li>
<li><a href='http://www.designisphilosophy.com/wordpress-as-cms/mix10-session-supporting-documents-20100314/' rel='bookmark' title='Permanent Link: MIX10 Session and Supporting Documents'>MIX10 Session and Supporting Documents</a></li>
<li><a href='http://www.designisphilosophy.com/css/why-a-css-reset-should-be-at-the-core-of-your-stylesheet-20090817/' rel='bookmark' title='Permanent Link: Why a CSS Reset should be at the core of your stylesheet'>Why a CSS Reset should be at the core of your stylesheet</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-658" title="I reject your stylesheet and substitute my own t-shirt" src="http://www.designisphilosophy.com/wp-content/uploads/2010/01/I-reject-your-stylesheet-and-substitute-my-own-t-shirt.jpg" alt="I reject your stylesheet and substitute my own t-shirt" width="507" height="378" /></p>
<p>Ever since I was invited to attend Microsoft&#8217;s web design and development conference MIX in 2008 I&#8217;ve been itching to submit my own session proposal and get on the podium to share with other developers and designers my experiences working with Expression Web and WordPress. The plan was to submit a proposal for MIX09 but life and work intervened and made it impossible for me to even attend (truth be told I was going to a wedding in Hawaii the same week so I really shouldn&#8217;t complain). But this year March is wide open and I&#8217;ve jumped in head first and submitted a talk with the modest title &#8220;<a title="Vote for my MIX10 OpenCall entry I Reject Your Stylesheet and Substitute My Own" href="http://visitmix.com/opencallvote/Entry?entryId=IREJEC116" target="_blank">I Reject Your Stylesheet And Substitute My Own &#8211; Rapid site design and prototyping with Expression Web 3 and WordPress</a>&#8221; to the OpenCall portion of MIX10. And now I need your help to get my proposal accepted so I can get in and do my thing.</p>
<p>OpenCall is literally a popularity contest: The ten most voted on proposals get a slot at the conference and the rest are left by the wayside. As far as I can tell my proposal is the only one focusing on Expression Web (at least it&#8217;s the only one that shows up on a search) and also the only one talking about WordPress so my hope is that both those interested in the web authoring application and those interested in WordPress specifically or open-source or CMS design in general will find it compelling and want to vote for it. Only time will tell.</p>
<p>To vote for <a title="Vote for my MIX10 OpenCall entry I Reject Your Stylesheet and Substitute My Own" href="http://visitmix.com/opencallvote/Entry?entryId=IREJEC116" target="_blank">I Reject Your Stylesheet and Substitute My Own</a> visit the <a title="Vote for I Reject Your Stylesheet and Substitute My Own" href="http://visitmix.com/opencallvote/Entry?entryId=IREJEC116" target="_blank">OpenCall ballot page found here</a> and click the Add session to ballot button. You can vote for a total of 5 sessions with one ballot. The rest of the sessions can be found <a title="MIX10 OpenCall entries" href="http://visitmix.com/opencallvote/" target="_blank">here</a>. Once you&#8217;re done voting, spread the word and get all your friends to vote for me as well. Voting ends on the 15th of January so there&#8217;s little time but I am certain with your help my name will appear on the roster alongside the many other fantastic speakers at <a title="MIX10" href="http://live.visitmix.com/" target="_blank">MIX10</a>.</p>
<p>Oh, and if you&#8217;re interested the extremely limited edition I Reject Your Stylesheet and Substitute My Own T-shirts are available in green, blue, tan and black sizes S, M and L (Fruit of the Loom, heavy cotton) for $20. <a title="Get the awesome t-shirt" href="http://www.designisphilosophy.com/contact/" target="_blank">Contact me with your name and mailing address</a> and I&#8217;ll wrap one up and send it to you.</p>


<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/news/2008-weblog-awards-finalist-20090102/' rel='bookmark' title='Permanent Link: 2008 Weblog Awards Finalist'>2008 Weblog Awards Finalist</a></li>
<li><a href='http://www.designisphilosophy.com/wordpress-as-cms/mix10-session-supporting-documents-20100314/' rel='bookmark' title='Permanent Link: MIX10 Session and Supporting Documents'>MIX10 Session and Supporting Documents</a></li>
<li><a href='http://www.designisphilosophy.com/css/why-a-css-reset-should-be-at-the-core-of-your-stylesheet-20090817/' rel='bookmark' title='Permanent Link: Why a CSS Reset should be at the core of your stylesheet'>Why a CSS Reset should be at the core of your stylesheet</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/microsoft-expression-web/mix10-proposal-i-reject-your-stylesheet-and-substitute-my-own-20100106/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Introducing WaveFront &#8211; a new free WordPress theme</title>
		<link>http://www.designisphilosophy.com/wordpress-themes/introducing-wavefront-a-new-free-wordpress-theme-20090922/</link>
		<comments>http://www.designisphilosophy.com/wordpress-themes/introducing-wavefront-a-new-free-wordpress-theme-20090922/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 22:56:43 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[WordPress Themes]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=607</guid>
		<description><![CDATA[Click here to download the free WaveFront theme from the WordPress Theme Directory. The WaveFront theme is a free generic WordPress theme designed to replicate the looks and features of the two custom WordPress sites Stop Living in the Past and AnnyChih.com. WaveFront provides calm yet stylish layouts customized for basic CMS functionality with several [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/css/typography-new-wordpress-theme-20081127/' rel='bookmark' title='Permanent Link: Typograph &#8211; new WordPress Theme'>Typograph &#8211; new WordPress Theme</a></li>
<li><a href='http://www.designisphilosophy.com/events/vancouver-wordpress-meetup-talk-simple-yet-powerful-wordpress-hacks-20100812/' rel='bookmark' title='Permanent Link: Vancouver WordPress Meetup Talk: Simple Yet Powerful WordPress Hacks'>Vancouver WordPress Meetup Talk: Simple Yet Powerful WordPress Hacks</a></li>
<li><a href='http://www.designisphilosophy.com/news/typograph-for-wordpress-27-coltrane-released-20081211/' rel='bookmark' title='Permanent Link: Typograph for WordPress 2.7 Coltrane released'>Typograph for WordPress 2.7 Coltrane released</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" title="WaveFront" src="http://www.designisphilosophy.com/wp-content/uploads/2009/09/wavefront.jpg" alt="WaveFront" width="506" height="488" /></p>
<blockquote><p><a title="Download WaveFront from the WordPress Theme Directory" href="http://wordpress.org/extend/themes/wavefront" target="_blank">Click here to download the free WaveFront theme from the WordPress Theme Directory.<br />
</a></p></blockquote>
<p>The WaveFront theme is a free generic WordPress theme designed to replicate the looks and features of the two custom WordPress sites <a title="Stop Living in the Past - join the movement to phase out Internet Explorer 6 forever" href="http://www.stoplivinginthepast.com" target="_blank">Stop Living in the Past</a> and <a title="Anny Chih travels the world and blogs about it." href="http://www.annychih.com" target="_blank">AnnyChih.com</a>.</p>
<p>WaveFront provides calm yet stylish layouts customized for basic CMS functionality with several custom page templates including a no-sidebar front page (Front Page template) with three bottom boxes. The theme also has a list of hidden features and extra content that can be turned on and off by editing the template files.</p>
<p>For a full rundown of WaveFront&#8217;s features and customization options please visit the <a title="WaveFront - a calming space" href="http://www.designisphilosophy.com/free-wordpress-themes/wavefront-a-calm-space/" target="_blank">dedicated theme page here</a>.</p>


<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/css/typography-new-wordpress-theme-20081127/' rel='bookmark' title='Permanent Link: Typograph &#8211; new WordPress Theme'>Typograph &#8211; new WordPress Theme</a></li>
<li><a href='http://www.designisphilosophy.com/events/vancouver-wordpress-meetup-talk-simple-yet-powerful-wordpress-hacks-20100812/' rel='bookmark' title='Permanent Link: Vancouver WordPress Meetup Talk: Simple Yet Powerful WordPress Hacks'>Vancouver WordPress Meetup Talk: Simple Yet Powerful WordPress Hacks</a></li>
<li><a href='http://www.designisphilosophy.com/news/typograph-for-wordpress-27-coltrane-released-20081211/' rel='bookmark' title='Permanent Link: Typograph for WordPress 2.7 Coltrane released'>Typograph for WordPress 2.7 Coltrane released</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/wordpress-themes/introducing-wavefront-a-new-free-wordpress-theme-20090922/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typograph Critical Update for WordPress 2.8</title>
		<link>http://www.designisphilosophy.com/wordpress-themes/typograph-critical-update-for-wordpress-28-20090611/</link>
		<comments>http://www.designisphilosophy.com/wordpress-themes/typograph-critical-update-for-wordpress-28-20090611/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 15:22:41 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[typograph]]></category>
		<category><![CDATA[wordpress 2.8]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=493</guid>
		<description><![CDATA[It was brought to my attention last night that there is a critical conflict between the popular Typograph theme and the new WordPress 2.8. Knowing that most Typograph users will update their WordPress installation in the coming days finding the reason for the conflict and a solution was a number one priority and I am [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/news/typograph-for-wordpress-27-coltrane-released-20081211/' rel='bookmark' title='Permanent Link: Typograph for WordPress 2.7 Coltrane released'>Typograph for WordPress 2.7 Coltrane released</a></li>
<li><a href='http://www.designisphilosophy.com/wordpress-themes/typograph-theme-update-now-with-threaded-comments-20090113/' rel='bookmark' title='Permanent Link: Typograph Theme Update &#8211; Now With Threaded Comments'>Typograph Theme Update &#8211; Now With Threaded Comments</a></li>
<li><a href='http://www.designisphilosophy.com/css/typography-new-wordpress-theme-20081127/' rel='bookmark' title='Permanent Link: Typograph &#8211; new WordPress Theme'>Typograph &#8211; new WordPress Theme</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>It was brought to my attention last night that there is a critical conflict between the popular Typograph theme and the new WordPress 2.8. Knowing that most Typograph users will update their WordPress installation in the coming days finding the reason for the conflict and a solution was a number one priority and I am happy to say I&#8217;ve already created a fix that solves the problem. A full upgrade of Typograph will be published later today but for current installations the fix consists of just replacing one file. Here are instructions:</p>
<h3>Upgrade Typograph to work under WordPress 2.8</h3>
<ol>
<li>Download and unzip the archive with the <a title="Download the fixed functions.php file for Typograph." href="http://www.pinkandyellow.com/WP-themes/typographFIX.zip" target="_blank">fixed functions.php file here</a>.</li>
<li>Access your Typograph theme directory in your hosted WordPress installation (should be under www.yoursitename.com/wp-content/themes/Typograph).</li>
<li>Delete the old functions.php file under the Typograph theme directory.</li>
<li>Upload the new functions.php file to the Typograph theme directory.</li>
</ol>
<p>I have tested this critical fix and it works.</p>


<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/news/typograph-for-wordpress-27-coltrane-released-20081211/' rel='bookmark' title='Permanent Link: Typograph for WordPress 2.7 Coltrane released'>Typograph for WordPress 2.7 Coltrane released</a></li>
<li><a href='http://www.designisphilosophy.com/wordpress-themes/typograph-theme-update-now-with-threaded-comments-20090113/' rel='bookmark' title='Permanent Link: Typograph Theme Update &#8211; Now With Threaded Comments'>Typograph Theme Update &#8211; Now With Threaded Comments</a></li>
<li><a href='http://www.designisphilosophy.com/css/typography-new-wordpress-theme-20081127/' rel='bookmark' title='Permanent Link: Typograph &#8211; new WordPress Theme'>Typograph &#8211; new WordPress Theme</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/wordpress-themes/typograph-critical-update-for-wordpress-28-20090611/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation</title>
		<link>http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/</link>
		<comments>http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 15:30:48 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Video Tutorials]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[WordPress as CMS]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[expression]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[template_tags]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordcamp]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=354</guid>
		<description><![CDATA[Finally, after a full week of catching up, here is the video tutorial version of my presentation at WordCamp Whistler 09 for those who were there and those who couldn&#8217;t come. The video is also available on WordPress.tv if you&#8217;d rather watch it there. I recorded the video over the weekend and it contains the [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/' rel='bookmark' title='Permanent Link: Code snippets from my WordCamp presentation'>Code snippets from my WordCamp presentation</a></li>
<li><a href='http://www.designisphilosophy.com/events/speaking-about-wordpress-as-cms-at-wordcamp-whistler-what-do-you-want-me-to-cover-20090112/' rel='bookmark' title='Permanent Link: Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?'>Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?</a></li>
<li><a href='http://www.designisphilosophy.com/news/wordcamp-whistler-wordpress-as-cms-20081219/' rel='bookmark' title='Permanent Link: WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS'>WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><object width="516" height="392" data="http://vimeo.com/moogaloop.swf?clip_id=3061704&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=3061704&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /></object><br />
Finally, after a full week of catching up, here is the video tutorial version of my presentation at WordCamp Whistler 09 for those who were there and those who couldn&#8217;t come. The video is also available on <a title="Watch the video at WordPress.tv" href="http://wordpress.tv/2009/02/04/wordcamp-whislter-2009-using-wordpress-in-alternate-configurations/" target="_blank">WordPress.tv</a> if you&#8217;d rather watch it there. I recorded the video over the weekend and it contains the entire presentation including all my fancy slides as well as the code examples and demos. The only thing you won&#8217;t see is me waving my hands around and messing up the code like I did at the actual event ;o)</p>
<h3>Code Snippets</h3>
<p>The last half of the presentation centers around creating Custom Page Templates and Custom Fields for layout purposes. To help you along in your own WordPress site development, here are those code snippets ready to be cut and pasted into your templates:</p>
<h4>Custom Page Templates in 5 lines of code</h4>
<p>This block of code is inserted at the very top of the Custom Page Template file.  To get started, simply open the page.php file, save it under a different name, paste these 5 lines of code at the top of the document, save and upload to your server. To activate the new Custom Page Template just select it from the Template menu under Attributes in the Page Editor within WordPress.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php <span style="color: #66cc66;">/</span>*</span>
<span style="color: #009900;">Template <span style="color: #000066;">Name</span>: Whatever </span>
<span style="color: #009900;">*<span style="color: #66cc66;">/</span> ?&gt;</span></pre></div></div>

<h4>Custom Fields in one line of code</h4>
<p>This code can be used in any template file including but not limited to page.php, any Custom Page Templates, index.php, archives.php, single.php etc etc. The code returns a string of text that matches the text inserted in the custom field. Remember to replace $key with the actual name of the custom field. <a title="Custom Fields in the WordPress Codex" href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">You can read more about Custom Fields and how to use them in the WordPress Codex</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"> <span style="color: #009900;">&lt;?php echo get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, '$key', true); ?&gt;</pre></div></div>

<h4>Custom Field that parses PHP code</h4>
<p>This code is used to parse (interpret) PHP code inserted into custom fields. It is a bit wonky &#8211; for instance it terminates any other custom field code placed directly after it in a page &#8211; so use it with caution. Otherwise it works exactly as the code above.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php $boxContent <span style="color: #66cc66;">=</span> get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, 'centerBox', true); ?&gt; 
<span style="color: #009900;">&lt;?php eval<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'?'</span>.<span style="color: #ff0000;">'&gt;</span></span>'.$boxContent); ?&gt;</pre></div></div>

<h3>Applications Used in the Presentation</h3>
<p>After the presentation several people came up to me and asked what applications I used, so here is a short list:</p>
<h4>BitNami WordPress Stack</h4>
<p>The demo site I used in the presentation was actually installed and running locally within Windows 7. To achieve this I used an ingenious application named <a title="Download the BitNami WordPress Stack" href="http://bitnami.org/stack/wordpress" target="_blank">BitNami WordPress Stack</a>. Once installed this application will run a fully functional version of WordPress with database entry, plug-ins, custom themes and everything else you want to throw at it right inside Windows (XP, Vista and Windows 7 supported) so you don&#8217;t have to keep uploading your files to a server or hassle through complicated XAMP installs to play around with WordPress while offline. You can even install several different WordPress and other open source CMS stacks on your computer simultaneously to further increase your productivity. I have no idea exactly how it works but BitNami works incredibly well. Just remember to set the IP address to &#8220;localhost&#8221; when you install it.<br />
You can download the BitNami WordPress Stack here. For Mac users there is a similar application called <a title="MAMP" href="http://www.mamp.info/en/index.php" target="_blank">MAMP</a> but I know nothing about it.</p>
<h4>Web Developer Add-On for FireFox</h4>
<p>FireFox is my absolute favourite browser and I use it for browsing as well as in the design process. One of the main advantages of FireFox is the myriad of add-ons you can install that make web site development a lot easier. The one I use the most is the <a title="Download the Web Developer add-on for FireFox" href="https://addons.mozilla.org/en-US/firefox/addon/60" target="_blank">Web Developer Add-On</a>. This small application within an application lets you see and mess with CSS, turn styles and JavaScript on and off and do tons of other stuff that makes it easier to dissect and troubleshoot buggy web pages. Combine it with the <a title="Download the HTML Validator add-on for FireFox" href="https://addons.mozilla.org/en-US/firefox/addon/249" target="_blank">HTML Validator add-on</a> and you have a true powerhouse in a small browser window.</p>
<h4>Microsoft Expression Web 2</h4>
<p>My web development platform of choice is Microsoft Expression Web 2. This new offering from Microsoft is what enables me to build custom WordPress themes and web sites like <a title="Hire Anny Chih for the Best Job in the World" href="http://www.annychih.com" target="_blank">AnnyChih.com</a> from scratch in less than 24 hours. There are many great things you can talk about with Expression Web 2 but for WordPress theme development the two main features is full PHP support, unrivaled CSS integration and Standards Based CSS generation right out of the box. If you want to know more about Expression Web 2 or want to learn how to use it you can read more on this blog or pick up a copy of my book <a title="Teach Yourself Microsoft Expression Web" href="http://tinyurl.com/styexpressionweb2" target="_blank">Sams Teach Yourself Microsoft Expression Web 2 in 24 Hours</a>. It&#8217;s a good read, I promise.</p>


<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/' rel='bookmark' title='Permanent Link: Code snippets from my WordCamp presentation'>Code snippets from my WordCamp presentation</a></li>
<li><a href='http://www.designisphilosophy.com/events/speaking-about-wordpress-as-cms-at-wordcamp-whistler-what-do-you-want-me-to-cover-20090112/' rel='bookmark' title='Permanent Link: Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?'>Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?</a></li>
<li><a href='http://www.designisphilosophy.com/news/wordcamp-whistler-wordpress-as-cms-20081219/' rel='bookmark' title='Permanent Link: WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS'>WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Code snippets from my WordCamp presentation</title>
		<link>http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/</link>
		<comments>http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 17:56:24 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[WordPress as CMS]]></category>
		<category><![CDATA[custom fields]]></category>
		<category><![CDATA[custom page templates]]></category>
		<category><![CDATA[whistler]]></category>
		<category><![CDATA[wordcamp]]></category>
		<category><![CDATA[wordcamp whistler]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=332</guid>
		<description><![CDATA[Here are some code snippets from my WordCamp Whistler presentation. This article will be expanded in the coming week but in the meantime here they are for anyone wanting to play around with them: Custom Page Templates in 5 lines of code &#60;?php /* Template Name: Whatever */ ?&#62; Custom Fields in one line of [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/' rel='bookmark' title='Permanent Link: Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation'>Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation</a></li>
<li><a href='http://www.designisphilosophy.com/events/speaking-about-wordpress-as-cms-at-wordcamp-whistler-what-do-you-want-me-to-cover-20090112/' rel='bookmark' title='Permanent Link: Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?'>Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?</a></li>
<li><a href='http://www.designisphilosophy.com/news/wordcamp-whistler-wordpress-as-cms-20081219/' rel='bookmark' title='Permanent Link: WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS'>WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Here are some code snippets from my WordCamp Whistler presentation. This article will be expanded in the coming week but in the meantime here they are for anyone wanting to play around with them:</p>
<h3>Custom Page Templates in 5 lines of code</h3>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php</span>
<span style="color: #009900;"><span style="color: #66cc66;">/</span>*</span>
<span style="color: #009900;">Template <span style="color: #000066;">Name</span>: Whatever</span>
<span style="color: #009900;">*<span style="color: #66cc66;">/</span></span>
<span style="color: #009900;">?&gt;</span></pre></div></div>

<h3>Custom Fields in one line of code</h3>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php echo get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, '$key', true); ?&gt;</pre></div></div>

<h3>Custom Field that parses PHP code</h3>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php $boxContent <span style="color: #66cc66;">=</span> get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, 'centerBox', true); ?&gt;
<span style="color: #009900;">&lt;?php eval<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'?'</span>.<span style="color: #ff0000;">'&gt;</span></span>'.$boxContent); ?&gt;</pre></div></div>



<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/' rel='bookmark' title='Permanent Link: Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation'>Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation</a></li>
<li><a href='http://www.designisphilosophy.com/events/speaking-about-wordpress-as-cms-at-wordcamp-whistler-what-do-you-want-me-to-cover-20090112/' rel='bookmark' title='Permanent Link: Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?'>Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?</a></li>
<li><a href='http://www.designisphilosophy.com/news/wordcamp-whistler-wordpress-as-cms-20081219/' rel='bookmark' title='Permanent Link: WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS'>WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Typograph Theme Update &#8211; Now With Threaded Comments</title>
		<link>http://www.designisphilosophy.com/wordpress-themes/typograph-theme-update-now-with-threaded-comments-20090113/</link>
		<comments>http://www.designisphilosophy.com/wordpress-themes/typograph-theme-update-now-with-threaded-comments-20090113/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 02:44:27 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[threaded comments]]></category>
		<category><![CDATA[typograph]]></category>
		<category><![CDATA[wordpress theme]]></category>

		<guid isPermaLink="false">http://blog.pinkandyellow.com/?p=316</guid>
		<description><![CDATA[The Typograph theme has proven to be incredibly popular and I have gotten tons of emails and comments about it with suggestions of improvements and updates. As an answer to all the input I have uploaded the 0.8.5 version of the theme to the WordPress Theme Directory where you can download it to spiff up [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/css/typography-new-wordpress-theme-20081127/' rel='bookmark' title='Permanent Link: Typograph &#8211; new WordPress Theme'>Typograph &#8211; new WordPress Theme</a></li>
<li><a href='http://www.designisphilosophy.com/wordpress-themes/typograph-critical-update-for-wordpress-28-20090611/' rel='bookmark' title='Permanent Link: Typograph Critical Update for WordPress 2.8'>Typograph Critical Update for WordPress 2.8</a></li>
<li><a href='http://www.designisphilosophy.com/news/typograph-for-wordpress-27-coltrane-released-20081211/' rel='bookmark' title='Permanent Link: Typograph for WordPress 2.7 Coltrane released'>Typograph for WordPress 2.7 Coltrane released</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a title="Download the Typograph theme with threaded comments for WordPress" href="http://wordpress.org/extend/themes/typograph" target="_blank"><img class="aligncenter size-full wp-image-319" title="typograph-new" src="http://blog.pinkandyellow.com/wp-content/uploads/2009/01/typograph-new.jpg" alt="typograph-new" width="500" height="113" /></a>The Typograph theme has proven to be incredibly popular and I have gotten tons of emails and <a title="Great user comments for the Typograph theme" href="http://blog.pinkandyellow.com/css/typography-new-wordpress-theme-20081127/" target="_blank">comments</a> about it with suggestions of improvements and updates. As an answer to all the input I have uploaded the 0.8.5 version of the theme to the <a title="Typograph at the WordPress Theme Directory" href="http://wordpress.org/extend/themes/typograph" target="_blank">WordPress Theme Directory</a> where you can <a title="Download Typograph" href="http://wordpress.org/extend/themes/typograph" target="_blank">download it</a> to spiff up your blog even more.</p>
<h3>Fixing the tabbed box</h3>
<p>One of the major issues with the original Typograph theme was an unexpected one for me: It turned out that the tabbed box was conflicting with a number of popular plug-ins including <a title="Lightbox 2" href="http://wordpress.org/extend/plugins/lightbox-2/" target="_blank">Lightbox 2</a> and others. When these plug-ins were installed one of two things would happen: either the plug-in wouldn&#8217;t work  or the tabbed box wouldn&#8217;t work.</p>
<p>After much discussion both in the <a title="The original Typograph posts" href="http://blog.pinkandyellow.com/css/typography-new-wordpress-theme-20081127/" target="_blank">original post</a> on this blog and also in the <a title="User comments on WordPress.org" href="http://wordpress.org/extend/themes/typograph" target="_blank">support forums</a> on WordPress.org it became clear that the problem was caused by two separate JavaScript conflicts: First off, the NicEdit HTML editor I used for the comments section was clashing with ceartain plug-ins. Seccondly the JQuery library used to create the tabbed box effect was impinging on other JQuery based plug-ins.</p>
<p>To solve this I&#8217;ve done two things: The NicEdit HTML editor for the comments is gone (so no more fancy HTML editing for now, sorry. I&#8217;m looking for a solution) and I have rebuilt the tabbed box from scratch using the MooTools library instead. Extensive testing with numerous plug-ins shows that at least as far as I know the conflicts are no longer there and everything works properly. If you do find any more conflicts, please tell me so I can fix them.</p>
<h4>Threaded Comments</h4>
<p><img class="aligncenter size-full wp-image-318" title="Typograph threaded comments" src="http://blog.pinkandyellow.com/wp-content/uploads/2009/01/threaded-comments.jpg" alt="Typograph threaded comments" width="500" height="291" />One of the really cool new features in WordPress 2.7 is threaded comments. Basically this means that when you comment on a posting you can answer other comments and your answer will appear &#8220;nested&#8221; within the comment you answered rather than on the bottom of the page. This is a very cool feature that you had to use a plug-in for in the past. Upgrading to threaded comments was quite a challenge. There is very little information about it around and it took me a while to figure it out. Luckily I came across two blogs with instructions and it is these two approaches combined that formed the basis for the threaded comments in Typograph. These were <a title="Styling threaded comments in WordPress 2.7" href="http://cdharrison.com/2008/12/threaded-comments/" target="_blank">Chris Harrison&#8217;s blog</a> (for styling) and <a title="Getting threaded comments to work in WordPress 2.7" href="http://ottodestruct.com/blog/2008/09/29/wordpress-27-comments-enhancements/" target="_blank">Otto&#8217;s blog</a> for backend code. Thanks go out to the both of them for excellent tutorials and to Otto for some extra help via e-mail.</p>


<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/css/typography-new-wordpress-theme-20081127/' rel='bookmark' title='Permanent Link: Typograph &#8211; new WordPress Theme'>Typograph &#8211; new WordPress Theme</a></li>
<li><a href='http://www.designisphilosophy.com/wordpress-themes/typograph-critical-update-for-wordpress-28-20090611/' rel='bookmark' title='Permanent Link: Typograph Critical Update for WordPress 2.8'>Typograph Critical Update for WordPress 2.8</a></li>
<li><a href='http://www.designisphilosophy.com/news/typograph-for-wordpress-27-coltrane-released-20081211/' rel='bookmark' title='Permanent Link: Typograph for WordPress 2.7 Coltrane released'>Typograph for WordPress 2.7 Coltrane released</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/wordpress-themes/typograph-theme-update-now-with-threaded-comments-20090113/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Using Conditional Custom Fields for Advanced Layouts</title>
		<link>http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/</link>
		<comments>http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 08:37:17 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[custom fields]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.pinkandyellow.com/?p=276</guid>
		<description><![CDATA[An often overlooked function in the WordPress arsenal is Custom Fields. Overlooked because to most it makes no sense: What do you use a custom field for? And how do you use it? The answers to these questions differ depending on how the WordPress theme has been set up: Custom fields can be used for [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/' rel='bookmark' title='Permanent Link: Code snippets from my WordCamp presentation'>Code snippets from my WordCamp presentation</a></li>
<li><a href='http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/' rel='bookmark' title='Permanent Link: Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation'>Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation</a></li>
<li><a href='http://www.designisphilosophy.com/tutorials/build-a-fancy-wordpress-author-box-20100507/' rel='bookmark' title='Permanent Link: Build a fancy WordPress author box'>Build a fancy WordPress author box</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>An often overlooked function in the WordPress arsenal is Custom Fields. Overlooked because to most it makes no sense: What do you use a custom field for? And how do you use it? The answers to these questions differ depending on how the WordPress theme has been set up: Custom fields can be used for everything from passing information to plug-ins like Next Gen Gallery to feeding custom areas in the template with information. But it goes way beyond that. Custom Fields can also be used to create advanced layouts and design variances that can be triggered on a page by page or post by post basis. And this tehcnique can be edhanced further by adding conditions to the scripts so that the changes only appear when the field is actually activated.</p>
<h3>Understanding custom fields</h3>
<p>You can add custom fields to any WordPress post or page through the custom fields interface found right underneath the main text area. The custom field contains two elements; a name and a value. These are pretty self explanatory: When the template asks the server for the name, the value is returned. But this also means that unless the template actually asks for the field by name, nothing is returned. An example to show how this works in real life:</p>
<p><img class="aligncenter size-full wp-image-278" title="Artist menu" src="http://blog.pinkandyellow.com/wp-content/uploads/2008/12/artistmen.jpg" alt="Artist menu" width="498" height="143" />A web site for an art gallery requires each artist page to have a series of sub-pages containing an artists statement, bio, CV and image gallery. Although adding an unordered list directly to the text body of the page would work, it would require the addition of style elements and tags &#8211; something WordPress doesn&#8217;t like very much. Not to mention it&#8217;s also cumbersome and messy. A better solution is to place all the style tags in the template and then just feed the menu in the form of a standard unordered list from a custom field, in this case with the name &#8220;artistMenu&#8221;. Then all that&#8217;s left is to get the template to call for the info in the custom field 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;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;artistMenu&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;?php echo get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;artistMenu&quot;, true); ?&gt;		
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>When the template is opened, the content of the custom field named &#8220;artistMenu&#8221; is placed as a string inside the artistMenu div. (To understand exactly how the php code works you can read about the <a title="More info on the get_post_meta tag" href="http://codex.wordpress.org/Function_Reference/get_post_meta" target="_blank">get_post_meta</a> template tag in the WordPress Codex.)</p>
<h3>Making the custom fields conditional</h3>
<p>The problem with the example above is that even if there is no custom field defined, the div is still placed in the page taking up space. Not a big problem when it&#8217;s just a horizontal menu but if you use a custom field to populate something larger, like an image gallery or a text box, it will look weird if the box is left empty. One way of avoiding this is to make two separate templates, one with the custom field code and one without, but that can quickly become complicated. And the whole idea here is to make things simpler, not more complicated. A better way is to make the code and the call for the custom field conditional on whether the custom field has been defined in the first place. This can be done with a simple <em>if</em> statement:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php  if<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;artistMenu&quot;, true))) { ?&gt;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;artistMenu&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;?php echo get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;artistMenu&quot;, true); ?&gt;		
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;?php <span style="color: #66cc66;">&#125;</span> ?&gt;</span></pre></div></div>

<h3>Using conditional custom fields as design elements</h3>
<p>Now for the really cool stuff: Because we can make custom fields conditional, and because we can populate them with pretty much anything, we can use them not only to add images or text but also to add all new design and layout elements. In the site I built for <a title="Sablok &amp; Sablok - Notaries Public" href="http://sablok.com" target="_blank">Sablok &amp; Salbok Notaries Public</a> I used this technique to create a header element that only appears if the custom field is populated by an image or text. The actual appearance of the element is controlled by standard CSS. You can see this layout element as the blue horizontal area in the image and on the front page of the site.</p>
<p><img class="aligncenter size-full wp-image-279" title="Sablok &amp; Sablok custom field" src="http://blog.pinkandyellow.com/wp-content/uploads/2008/12/sablok.jpg" alt="Sablok &amp; Sablok custom field" width="499" height="203" />In this particular example the custom field can be populated by an image. Rather than forcing the user to input all the image code in the custom field manually I added some extra code in the template that gathers the width and height of the image and creates the proper element code. As a result all the user has to do is provide the URL for the image. There is also an <em>or</em> condition in the <em>if</em> statement so that the custom field code in the template is triggered either when an image field or a text field is defined:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php  if<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;image&quot;, true)) || (get_post_meta($post-&gt;ID, &quot;text&quot;, true))) { ?&gt;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;subheader&quot;</span>&gt;</span>
&nbsp;
		<span style="color: #009900;">&lt;?php if<span style="color: #66cc66;">&#40;</span>get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;image&quot;, true)) {
		$size = getimagesize(get_post_meta($post-&gt;ID, &quot;image&quot;, true)); ?&gt;
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo get_post_meta($post-&gt;</span></span>ID, &quot;image&quot;, true); ?&gt;&quot; alt=&quot;&quot; width=&quot;<span style="color: #009900;">&lt;?php echo $size<span style="color: #66cc66;">&#91;</span>0<span style="color: #66cc66;">&#93;</span>; ?&gt;</span>&quot; height=&quot;<span style="color: #009900;">&lt;?php echo $size<span style="color: #66cc66;">&#91;</span>1<span style="color: #66cc66;">&#93;</span>; ?&gt;</span>&quot; /&gt;
		<span style="color: #009900;">&lt;?php <span style="color: #66cc66;">&#125;</span> ?&gt;</span>
&nbsp;
		<span style="color: #009900;">&lt;?php if<span style="color: #66cc66;">&#40;</span>get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;text&quot;, true)) {?&gt;
		<span style="color: #009900;">&lt;?php echo get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;text&quot;, true); ?&gt;
		<span style="color: #009900;">&lt;?php <span style="color: #66cc66;">&#125;</span> ?&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span> <span style="color: #808080; font-style: italic;">&lt;!-- END SUBHEADER --&gt;</span>
<span style="color: #009900;">&lt;?php <span style="color: #66cc66;">&#125;</span> ?&gt;</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/' rel='bookmark' title='Permanent Link: Code snippets from my WordCamp presentation'>Code snippets from my WordCamp presentation</a></li>
<li><a href='http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/' rel='bookmark' title='Permanent Link: Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation'>Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation</a></li>
<li><a href='http://www.designisphilosophy.com/tutorials/build-a-fancy-wordpress-author-box-20100507/' rel='bookmark' title='Permanent Link: Build a fancy WordPress author box'>Build a fancy WordPress author box</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Typograph for WordPress 2.7 Coltrane released</title>
		<link>http://www.designisphilosophy.com/news/typograph-for-wordpress-27-coltrane-released-20081211/</link>
		<comments>http://www.designisphilosophy.com/news/typograph-for-wordpress-27-coltrane-released-20081211/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 19:56:18 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[typograph]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress theme]]></category>

		<guid isPermaLink="false">http://blog.pinkandyellow.com/?p=253</guid>
		<description><![CDATA[With the release of WordPress 2.7 Coltrane came the introduction of a new template tag called post_class(). Interestingly I have been using a custom template tag by that exact name for a long time in my themes including the free Typograph. That means when users of Typograph upgrade to WordPress 2.7 Coltrane a conflict occurs [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/wordpress-themes/typograph-critical-update-for-wordpress-28-20090611/' rel='bookmark' title='Permanent Link: Typograph Critical Update for WordPress 2.8'>Typograph Critical Update for WordPress 2.8</a></li>
<li><a href='http://www.designisphilosophy.com/css/typography-new-wordpress-theme-20081127/' rel='bookmark' title='Permanent Link: Typograph &#8211; new WordPress Theme'>Typograph &#8211; new WordPress Theme</a></li>
<li><a href='http://www.designisphilosophy.com/wordpress-themes/typograph-theme-update-now-with-threaded-comments-20090113/' rel='bookmark' title='Permanent Link: Typograph Theme Update &#8211; Now With Threaded Comments'>Typograph Theme Update &#8211; Now With Threaded Comments</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>With the release of <a title="WordPress 2.7 is now available" href="http://wordpress.org/development/2008/12/coltrane/" target="_blank">WordPress 2.7 Coltrane</a> came the introduction of a new template tag called post_class(). Interestingly I have been using a custom template tag by that exact name for a long time in my themes including the free Typograph. That means when users of Typograph upgrade to WordPress 2.7 Coltrane a conflict occurs between the WordPress functions.php file and the Typograph functions.php file because both define the same template tag.</p>
<p>To solve this issue I have released a new version of the Typograph theme customized for WordPress 2.7 Coltrane. It has been submitted to the WordPress Theme Directory pending approval. In the meantime you can download it directly from my server:</p>
<h4><a title="Download Typograph for WordPress 2.7" href="http://wordpress.org/extend/themes/typograph" target="_blank">Download Typograph for WP 2.7</a></h4>


<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/wordpress-themes/typograph-critical-update-for-wordpress-28-20090611/' rel='bookmark' title='Permanent Link: Typograph Critical Update for WordPress 2.8'>Typograph Critical Update for WordPress 2.8</a></li>
<li><a href='http://www.designisphilosophy.com/css/typography-new-wordpress-theme-20081127/' rel='bookmark' title='Permanent Link: Typograph &#8211; new WordPress Theme'>Typograph &#8211; new WordPress Theme</a></li>
<li><a href='http://www.designisphilosophy.com/wordpress-themes/typograph-theme-update-now-with-threaded-comments-20090113/' rel='bookmark' title='Permanent Link: Typograph Theme Update &#8211; Now With Threaded Comments'>Typograph Theme Update &#8211; Now With Threaded Comments</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/news/typograph-for-wordpress-27-coltrane-released-20081211/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Typograph &#8211; new WordPress Theme</title>
		<link>http://www.designisphilosophy.com/css/typography-new-wordpress-theme-20081127/</link>
		<comments>http://www.designisphilosophy.com/css/typography-new-wordpress-theme-20081127/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 17:59:21 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[wp themes]]></category>

		<guid isPermaLink="false">http://blog.pinkandyellow.com/?p=205</guid>
		<description><![CDATA[I&#8217;ve closed the comments for this thread to consolidate all comments for the different versions of the Typograph theme in one place. Please leave all your comments at the Typograph page which can be found by clicking here. I&#8217;ve been planning to launch a proper free WordPress theme for some time now but there have [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/wordpress-themes/typograph-theme-update-now-with-threaded-comments-20090113/' rel='bookmark' title='Permanent Link: Typograph Theme Update &#8211; Now With Threaded Comments'>Typograph Theme Update &#8211; Now With Threaded Comments</a></li>
<li><a href='http://www.designisphilosophy.com/wordpress-themes/typograph-critical-update-for-wordpress-28-20090611/' rel='bookmark' title='Permanent Link: Typograph Critical Update for WordPress 2.8'>Typograph Critical Update for WordPress 2.8</a></li>
<li><a href='http://www.designisphilosophy.com/news/typograph-for-wordpress-27-coltrane-released-20081211/' rel='bookmark' title='Permanent Link: Typograph for WordPress 2.7 Coltrane released'>Typograph for WordPress 2.7 Coltrane released</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.pinkandyellow.com/wp-content/uploads/2008/11/typographtheme.jpg"><img class="aligncenter size-full wp-image-206" title="Typograhy WordPress Theme" src="http://blog.pinkandyellow.com/wp-content/uploads/2008/11/typographtheme.jpg" alt="" width="500" height="265" /></a></p>
<blockquote><p>I&#8217;ve closed the comments for this thread to consolidate all comments for the different versions of the Typograph theme in one place. Please leave all your comments at the <a title="Typograph theme page" href="http://blog.pinkandyellow.com/free-wordpress-themes/typograph/" target="_blank">Typograph page which can be found by clicking here</a>.</p></blockquote>
<p>I&#8217;ve been planning to launch a proper free WordPress theme for some time now but there have always been major projects in the way. This week I had some extra time so I sat down and developed the Typograph theme which is now available for anyone to use. For free.</p>
<p>The theme is as simple as possible with clear separation between the content and the sidebar, a calm gray and white design with popping red links, a tabbed sidebar box with navigation, search and other important elements and some other styling for increased readability and better navigation. It complies with the new WordPress standard elements like image captions and Gravatars and even has a customizable ad space directly under the first post on the front page. And last but not least, Typograph is fully <a title="Valid W3C XHTML 1.0 Strict" rel="external" href="http://validator.w3.org/check/referer"> XHTML</a> and 		<a title="Valid W3C CSS" rel="external" href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3"> CSS</a> standards compliant.</p>
<h4><a title="Download the free Typograph WordPress Theme" href="http://wordpress.org/extend/themes/typograph" target="_blank">Download the Typograph theme from the WordPress Theme Directory here!</a></h4>
<h4><a title="Typograph Theme Demo" href="http://wp-themes.com/typograph" target="_blank">See a demo of the Typograph theme here</a></h4>
<h3>No images</h3>
<p>Right before I began the design of this theme, <a title="SpyreMag" href="http://spyremag.com" target="_blank">Spyremag</a> published an article about <a title="Read the article" href="http://spyremag.com/5-ways-to-break-your-design-habits-just-for-fun/" target="_blank">5 ways to break your design habits</a>, one of which was to design a site using no images. Seeing as I&#8217;ve become somewhat obsessed with CSS over the last year it seemed only appropriate to follow this advice and create a no-images theme. Not only would this be a bit of a challenge because I ususually use a lot of images to make my designs more vibrant, but it would also put my coding skills and my understsanding of WordPress themes to the test.</p>
<h3>Styled from scratch</h3>
<p>Over the last several months I&#8217;ve been refining and customizing a copy of the <a title="The Sandbox WordPress theme" href="http://www.plaintxt.org/themes/sandbox/" target="_blank">Sandbox WordPress theme</a> to develop an ideal platform for quick and easy WordPress theme design. The plan is to create a &#8220;God Theme&#8221; if you will that has all the bells and whistles installed and ready to go so that new theme design is quick and efficient. To put the alpha version of this foundation theme to the test I used it to style Typograph from scratch.</p>
<h3>Tabbed box navigation</h3>
<p><img class="alignleft size-full wp-image-207" title="Tabbed Box" src="http://blog.pinkandyellow.com/wp-content/uploads/2008/11/tabbedbox.jpg" alt="" width="227" height="209" />When I created the new theme for <a title="Design is Philosophy - WordPress, CSS and design tutorials" href="http://blog.pinkandyellow.com">Design is Philosophy</a> I spent quite a bit of time developing and perfecting a <a title="JQuery - smart little JavaScript library" href="http://jquery.com/" target="_blank">JQuery</a> and CSS based tabbed sidebar box that would contain navigation as well as other useful information for the visitor. For Typograph I further developed the tabbed box and isolated it in it&#8217;s own file to simplify customization for the user. It can also easily be deactivated by commenting out a single line of code in the sidebar.php template. The tabbed box contains navigation for pages and categories along with an about section, RSS link and search box by default. It takes standard WordPress tags and can be customized to include pretty much anything by editing the tabbedBox.php file found in the theme directory.</p>
<h4><a title="Download the free Typograph WordPress Theme" href="http://wordpress.org/extend/themes/typograph" target="_blank">Download the Typograph theme from the WordPress Theme Directory here!</a></h4>
<h4><a title="Typograph Theme Demo" href="http://wp-themes.com/typograph" target="_blank">See a demo of the Typograph theme here</a></h4>


<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/wordpress-themes/typograph-theme-update-now-with-threaded-comments-20090113/' rel='bookmark' title='Permanent Link: Typograph Theme Update &#8211; Now With Threaded Comments'>Typograph Theme Update &#8211; Now With Threaded Comments</a></li>
<li><a href='http://www.designisphilosophy.com/wordpress-themes/typograph-critical-update-for-wordpress-28-20090611/' rel='bookmark' title='Permanent Link: Typograph Critical Update for WordPress 2.8'>Typograph Critical Update for WordPress 2.8</a></li>
<li><a href='http://www.designisphilosophy.com/news/typograph-for-wordpress-27-coltrane-released-20081211/' rel='bookmark' title='Permanent Link: Typograph for WordPress 2.7 Coltrane released'>Typograph for WordPress 2.7 Coltrane released</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/css/typography-new-wordpress-theme-20081127/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
	</channel>
</rss>
