<?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 Adaptations &#187; Tutorials</title>
	<atom:link href="http://designadaptations.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://designadaptations.com</link>
	<description>Exploring what&#039;s possible in design...</description>
	<lastBuildDate>Sat, 05 Jun 2010 16:47:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-RC2-15136</generator>
		<item>
		<title>How to Distinguish Author Comments on Your Blog</title>
		<link>http://designadaptations.com/tutorials/how-to-distinguish-author-comments-on-your-blog/</link>
		<comments>http://designadaptations.com/tutorials/how-to-distinguish-author-comments-on-your-blog/#comments</comments>
		<pubDate>Thu, 29 Nov 2007 21:08:26 +0000</pubDate>
		<dc:creator>Charity</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[organization]]></category>
		<category><![CDATA[publishing]]></category>

		<guid isPermaLink="false">http://designadaptations.com/notebook/how-to-distinguish-autor-comments-on-your-blog/</guid>
		<description><![CDATA[One of my readers asked a good question today about how to differentiate author comments from those made by readers. It never occurred to me to write a tutorial on something like that, so thanks goes out to Chris Coyier &#8230; <a href="http://designadaptations.com/tutorials/how-to-distinguish-author-comments-on-your-blog/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of my readers asked a good question today about how to differentiate author comments from those made by readers.  It never occurred to me to write a tutorial on something like that, so thanks goes out to <a title="CSS Tricks" href="http://css-tricks.com/">Chris Coyier</a> for the idea. He has a nice looking blog and also writes about CSS (and WordPress), so if you like this site you might want to check out his site as well!</p>
<p>Okay, getting started. Open up your comments.php file. (This tutorial assumes you&#8217;re using <a title="WordPress personal publishing system" href="http://wordpress.org">WordPress</a> as your blogging platform, by the way). Look for your opening OL tag. Using the default theme as an example, you should see something like this about 1/4 of the way down the page:</p>
<p>Depending on how your theme is set up, next you might see the statement within the LI tag which instructs WordPress to echo the comment if it&#8217;s approved. We don&#8217;t want to go straight into that yet. Instead, we&#8217;re going to insert some code telling WP to also check if it&#8217;s an author comment. Here&#8217;s how it looks in my comments.php file (I removed the Gravatar code for brevity&#8217;s sake):</p>
<p><code lang="php">< ?php if ($comment->comment_author_email=="charity@designadaptations.com") echo 'author';<br />
	else echo $oddcomment; ?></code></p>
<p>This runs a comparison against whatever email address you entered as the administrator of your blog, so be sure you use that one if you want it to work. I you plan on having guest bloggers, you could also add this between <strong>echo &#8216;author&#8217;;</strong> and <strong>else echo</strong>:</p>
<p><code lang="php">else if ($comment->comment_author_email == "guest@email.com") echo 'specialguest';</code></p>
<p>Now you&#8217;ll have to add some styles to your CSS. The <a title="Web Developer Toolbar" href="http://chrispederick.com/work/web-developer/">Web Developer Toolbar</a> for <a title="Web Developer Addon for Firefox" href="https://addons.mozilla.org/en-US/firefox/addon/60">Firefox</a> is incredibly handy for this, because it&#8217;ll show you the elusive hooks used in WP&#8217;s core code which are used for identifying author comments. If you have it, hit Cmd+Shift+Y (Ctrl+Shift+Y on PC) and hover over a <strong>test</strong> author comment in your browser to see what I&#8217;m talking about.</p>
<p>Here&#8217;s how my style sheet looks:</p>
<p><code lang="css">.cite { /*for reader comments */<br />
float:left;<br />
margin:0;<br />
padding:5px;<br />
font-size:1em;<br />
width:120px;}<br />
.cite img{padding-right:5px;}<br />
.cite a{font-weight:bold;}<br />
.comment_content{float:right; width:390px;}</p>
<p>li.author .comment_text{/*for author comments*/<br />
color:#222;<br />
border:solid 1px #69c;<br />
background: #69c url(images/auth_comments.jpg) top left;}<br />
li.author .cite a{color:#333!important;}<br />
li.author .cite a:hover{color:#fff!important;}<br />
li.author .cite .commentmeta a{color:#333!important;}<br />
.author .comment_text p a {color:#fff !important;}</code></p>
<p>Notice I had to override the inherited rules (from the .cite class) by adding the <strong>!important</strong> keyword. You may or may not have to do this depending on your styling hooks and how they cascade.</p>
<p>That should be all there is to it! Having your comments visually distinguished from others is not only helpful to readers, but to you as the author if you need to refer back to something you said earlier. ;) It&#8217;s also a nice addition to the &#8220;curbisde appeal&#8221; of your site. Enjoy!
<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdesignadaptations.com%2Ftutorials%2Fhow-to-distinguish-author-comments-on-your-blog%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdesignadaptations.com%2Ftutorials%2Fhow-to-distinguish-author-comments-on-your-blog%2F&amp;source=feistyred&amp;style=compact&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://designadaptations.com/notebook/?ak_action=api_record_view&id=326&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://designadaptations.com/tutorials/how-to-distinguish-author-comments-on-your-blog/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How to Set Up Non-duplicating Recent Entries</title>
		<link>http://designadaptations.com/tutorials/how-to-set-up-non-duplicating-recent-entries/</link>
		<comments>http://designadaptations.com/tutorials/how-to-set-up-non-duplicating-recent-entries/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 14:49:18 +0000</pubDate>
		<dc:creator>Charity</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[publishing]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://designadaptations.com/notebook/how-to-set-up-non-duplicating-recent-entries/</guid>
		<description><![CDATA[It&#8217;s common knowledge by now that a Recent Posts list on the home page of a blog is beneficial for garnering more page views, just as a Related Posts list is for single entry pages. Unfortunately, many of the blogs &#8230; <a href="http://designadaptations.com/tutorials/how-to-set-up-non-duplicating-recent-entries/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s common knowledge by now that a Recent Posts list on the home page of a blog is beneficial for garnering more page views, just as a Related Posts list is for single entry pages. Unfortunately, many of the blogs I&#8217;ve seen using this technique are duplicating their most recent entry. Duplicate content is always a concern for blogs, and particularly those powered by WordPress. Fortunately, there&#8217;s a fix for it &#8211; at least when it comes to recent posts. Here&#8217;s how&#8230;</p>
<p>Instead of starting with the standard Loop, we&#8217;re going to open a query, like this:</p>
<p><code lang="php"><br />
< ?php $my_query = new WP_Query('showposts=1');<br />
while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post(); $do_not_duplicate = $post-&gt;ID; ?><br />
</code></p>
<p>This tells WordPress you only want <strong>one entry</strong> (the most recent) returned by the query, that there&#8217;s more to come, and don&#8217;t repeat it. Savvy? ;) Note: this will override any settings you have in the Dashboard for how many posts to display on your home page.</p>
<p>Now you should see some recognizable code calling the post title, meta data, and content, or some variation of these functions:</p>
<p><code lang="php"><br />
< ?php the_title() ?><br />
< ?php the_time('n/j/y') ?><br />
< ?php the_content(); ?><br />
</code></p>
<p>Beyond this you may have a call to your sidebar, some ads, or whatever you&#8217;ve dropped in. Just be sure to close your query with an <strong>endwhile statement</strong> (not endif).</p>
<p>Moving down the page to your Recent Entries section, you&#8217;ll need to alter the code a bit more. Again we start with a query, this time with however many posts you want displayed:</p>
<p><code lang="php"><br />
< ?php query_posts('showposts=5'); ?><br />
</code></p>
<p>Then, where you would normally call the [standard] Loop, alter it like so:</p>
<p><code lang="php"><br />
< ?php if (have_posts()) : while (have_posts()) : the_post();<br />
if( $post-&gt;ID == $do_not_duplicate ) continue; update_post_caches($posts); ?><br />
</code></p>
<p>Depending on how you want your list to appear, you may want to include the title and excerpt, the title and post meta, or all three, but it&#8217;s basically going to look like this:<br />
<code lang="php"><br />
< ul><br />
< li>< h3>< a href="< ?php the_permalink() ?>">< ?php the_title(); ?>< ?php the_title() ?>< /a>< /h3><br />
< small class="entrydate"> < ?php the_time('n/j/y') ?>< /small><br />
< ?php the_excerpt(); ?>< /li><br />
< /ul><br />
< ?php endwhile; ?><br />
</code></p>
<p>Whatever additional content you might have.</p>
<p><code lang="php"><br />
< ?php else : ?><br />
< h2>Not Found< /h2><br />
Sorry, nothing found.<br />
< ?php endif; ?><br />
</code><br />
You just created a custom index page which will show your most recent entry in full, along with a list of 5 previously featured entries &#8211; all without penalty of duplication. Of course, there&#8217;s more than one way to do just about everything in WordPress. This is the only way I know of, but if there&#8217;s a better way I&#8217;d love to hear it!</p>
<p><strong>Update:</strong> Suppose you want to do add a list to your single.php page as well? This can be done with a little less code, using another [foreach] loop:<br />
<code lang="php"><br />
< h2>Recently Featured<br />
< ul> < ?php global $post; $myposts = get_posts('numberposts=5&amp;offset=1');<br />
foreach($myposts as $post) : setup_postdata($post); ?><br />
	< li>< a href="< ?php the_permalink(); ?>">< ?php the_title(); ?>< /a>< /li><br />
< ?php endforeach; ?>< /ul></p>
<p>This tells WordPress to display the titles of the most recent 5 entries, <em>prior to the very latest one</em> (which of course will already be displaying in full in the main content section).</code>
<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdesignadaptations.com%2Ftutorials%2Fhow-to-set-up-non-duplicating-recent-entries%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdesignadaptations.com%2Ftutorials%2Fhow-to-set-up-non-duplicating-recent-entries%2F&amp;source=feistyred&amp;style=compact&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://designadaptations.com/notebook/?ak_action=api_record_view&id=311&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://designadaptations.com/tutorials/how-to-set-up-non-duplicating-recent-entries/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Select a Content Management System in 4 Hours or Less</title>
		<link>http://designadaptations.com/tutorials/select-a-content-management-system-in-4-hours-or-less/</link>
		<comments>http://designadaptations.com/tutorials/select-a-content-management-system-in-4-hours-or-less/#comments</comments>
		<pubDate>Fri, 19 Oct 2007 22:30:56 +0000</pubDate>
		<dc:creator>Charity</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[publishing]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://designadaptations.com/notebook/select-a-content-management-system-in-4-hours-or-less/</guid>
		<description><![CDATA[If you&#8217;re not a first-timer here, you already know I love WordPress. It&#8217;s come a long way in the two years I&#8217;ve been using it. That aside, I remember how difficult it was to select a content management system when &#8230; <a href="http://designadaptations.com/tutorials/select-a-content-management-system-in-4-hours-or-less/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re not a first-timer here, you already know I love WordPress. It&#8217;s come a long way in the two years I&#8217;ve been using it. That aside, I remember how difficult it was to select a content management system when I began blogging. There&#8217;s no shortage to choose from (both open source and premium), and the task can be overwhelming. Here then, is a light-hearted approach to choosing the best CMS for your needs, without spending a lot of time doing it!</p>
<p>Of the multitude out there, some of the most widely used include:</p>
<ul>
<li><a href="http://expressionengine.com/" title="Expression Engine - CMS">Expression Engine</a></li>
<li><a href="http://www.joomla.org/" title="Joomla! - CMS">Joomla</a></li>
<li><a href="http://drupal.org/" title="Drupal - CMS">Drupal</a></li>
<li><a href="http://www.mamboserver.com/" title="Mambo - CMS">Mambo</a></li>
<li><a href="http://www.modxcms.com/" title="MODx - CMS">MODx</a></li>
<li><a href="http://www.pligg.com/" title="Pligg - CMS">Pligg</a></li>
<li><a href="http://www.postnuke.com/" title="PostNuke">PostNuke</a></li>
<li><a href="http://www.textpattern.com/" title="TextPattern - CMS">TextPattern</a></li>
<li><a href="http://www.movabletype.com/" title="Movable Type - publishing platform">Movable Type</a></li>
<li><a href="http://wordpress.org" title="WordPress - personal publishing">WordPress</a></li>
</ul>
<p>I&#8217;ve tried 6/10 listed (I&#8217;m a test junkie), and spent <strong>days</strong> on research, installation, configuration, and the learning curve of each before making a final decision. If you don&#8217;t have days (or that much patience), this tutorial will spare you from a time-sink.</p>
<h3>So where should I begin?</h3>
<p>You <em>could</em> Google the term &#8216;CMS&#8217;, or <a href="http://www.opensourcecms.com/" title="Open Source CMS">look through</a> any number of <a href="http://www.cmswire.com/cms/cms-reviews/" title="CMS reviews">CMS review</a> sites, but this is untargeted research and will produce results which are too broad. I recommend starting with your favorite web-related forum. Chances are, someone there has already asked the proverbial question of which CMS is best. I know on <a href="http://sitepoint.com" title="Sitepoint">Sitepoint</a> alone there are over 300 replies (and 10k+ views) to <strong>one thread</strong> about <a href="http://www.sitepoint.com/forums/showthread.php?t=467938" title="Which blogging application do you use?">choosing a blog platform</a>.</p>
<h3>I don&#8217;t like forums, what else can I do?</h3>
<p>Forums aren&#8217;t for everyone, so consider this approach &#8211; surf around to see what software your favorite blogs are using. One of the first things I noticed when I started was that <a href="http://simplebits.com" title="SimpleBits - Dan Cedarholm">SimpleBits</a> was running Movable Type. I also used to frequent <a href="http://designadaptations.com/notebook/wp-admin/While%20you%27re%20surfing,%20do%20NOT%20add%20any%20more%20systems%20you%20may%20run%20across%20to%20your%20list." title="5thirtyone.com - Derek Punsalan">5thirtyone</a>, and saw it was running WordPress. Because the guys behind these two blogs are well-known and respected, I knew they weren&#8217;t going to rely on shaky software to manage their sites, so I made note of that.</p>
<p>As you browse, keep track of the sites using the systems you&#8217;re interested in. Once you&#8217;ve collected a reasonable set of stats (don&#8217;t spend more than an hour), check to see which CMS popped up the most.</p>
<h3>Sizing up the information</h3>
<p>Based on your findings in the forums, OR the stats you&#8217;ve gathered, you&#8217;ll notice 2 or 3 platforms which stand out. Congratulations, you&#8217;ve managed to intelligently separate the wheat from the chaff. Now it&#8217;s time to visit each organization&#8217;s website and read up. Some things to look for as you move through each site:</p>
<ol>
<li><strong>Is there a solid list of features?</strong> <strong>Are there screen shots? </strong>If not, pass. You don&#8217;t have time to figure out what they have to offer if they&#8217;re not going to put it right up front.</li>
<li><strong>Is there a support forum or help documentation?</strong> Don&#8217;t even bother <em>unless they have both</em>. Run, don&#8217;t walk, to the next site on your list. ;)</li>
<li><strong>Is the site easy to navigate? Is the language understandable?</strong> If you can&#8217;t easily browse the site or understand the info being presented, it&#8217;s safe to assume the software won&#8217;t be easy to learn either. A CMS is supposed to make your life better, not more complicated.</li>
<li><strong>Are there any plugins available?</strong> The best systems recognize that they can&#8217;t possibly serve <em>every need</em>. Plugins allow you to extend the functionality of the software, and mold it to fit your needs exclusively.</li>
<li><strong>Are there a variety of themes?</strong> I strongly recommend avoiding any platform that has no themes except the default, unless you&#8217;re a pioneering contributor type. The more themes available to learn from and pick apart, the easier it will be to customize one of your own.</li>
<li><strong>Are there links to other sites using the platform?</strong> This isn&#8217;t critical, but it will give you an idea of what others have done with the software in terms of design and possibly integrating plugins.</li>
</ol>
<p>At this point you should have about 3 hours of research invested &#8211; perhaps 1 on the forums (or browsing), and 2 on company sites. Don&#8217;t spend more than 4. Choosing software is sometimes a matter of guesswork, and the point here is to move on to actually evaluating it.</p>
<p>By now you should have a good idea what your candidate for the first trial install is. Hopefully, your research was thorough enough that it will be the ONLY install. :) If not, you&#8217;ll have at least one fall-back to try <em>without spending any more time</em> on research, and you&#8217;ve spent only a fraction of the time I did on selecting a CMS! Rock on.
<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdesignadaptations.com%2Ftutorials%2Fselect-a-content-management-system-in-4-hours-or-less%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdesignadaptations.com%2Ftutorials%2Fselect-a-content-management-system-in-4-hours-or-less%2F&amp;source=feistyred&amp;style=compact&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://designadaptations.com/notebook/?ak_action=api_record_view&id=305&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://designadaptations.com/tutorials/select-a-content-management-system-in-4-hours-or-less/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Use Conditional Tags to Empower Your Content</title>
		<link>http://designadaptations.com/tutorials/use-conditional-tags-to-empower-your-content/</link>
		<comments>http://designadaptations.com/tutorials/use-conditional-tags-to-empower-your-content/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 15:35:30 +0000</pubDate>
		<dc:creator>Charity</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[theming]]></category>

		<guid isPermaLink="false">http://designadaptations.com/notebook/use-conditional-tags-to-empower-your-content/</guid>
		<description><![CDATA[Have you ever wanted to display different content for certain pages on your blog? Why not right? Contextually relevant links, ads, or content is always a good idea. Until recently, I had been creating separate sidebar templates to accomplish this, &#8230; <a href="http://designadaptations.com/tutorials/use-conditional-tags-to-empower-your-content/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to display different content for certain pages on your blog? Why not right? Contextually relevant links, ads, or content is always a good idea. Until recently, I had been creating separate sidebar templates to accomplish this, but it&#8217;s the hard way &#8217;round.</p>
<p>When I began coding <a href="http://designadaptations.com/notebook/pink-adaptations-wordpress-theme/" title="Pink Adaptations WordPress theme">Pink Adaptations</a>, I discovered <a href="http://codex.wordpress.org/Conditional_Tags" title="Conditional Tags">conditional tags</a> and the power and flexibility they afford. If you&#8217;re not familiar, conditional tags are essentially a way to show content based on whether a specific requirement is met.</p>
<p>It&#8217;s done by using an if statement (not unlike <a href="http://codex.wordpress.org/The_Loop" title="The Loop">The Loop</a>). You may have seen this bit of code if you&#8217;ve ever looked through the default theme packaged with WordPress:</p>
<pre>&lt;?php /* If this is a category archive */ } { ?&gt;
	&lt;p &gt;You are currently browsing the archives for the
	&lt;? php single_cat_title(''); ? &gt; category.&lt;/p &gt;
? php } ? &gt;</pre>
<p>I stupidly ignored this for a long time because I didn&#8217;t fully understand its purpose, but this one snippet can be tweaked to display predetermined content not just for the archive page, but also your index, single post, search, Pages, and <em>even custom templates</em>.</p>
<p>For example, on my Themes page, I wanted to show a sidebar blurb about custom theming, a donation option, etc. I didn&#8217;t want this info on every page across my site, so I added the following conditional tag in sidebar.php:</p>
<pre>&lt; ?php if (is_page('wordpress-themes')) { ? &gt;
	&lt; p&gt;Blah blah blah.&lt;/ p&gt;
&lt; ?php } ? &gt;</pre>
<p>This refers to the slug of my <a href="http://designadaptations.com/wordpress-themes" title="Free WordPress Themes - Design Adaptations">Themes</a> page, and when the condition is met it displays only the content I specified.</p>
<p>Conditional tags are a very efficient method of controlling various sidebar content for different pages &#8211; and how nice to be able to manage all of it from one place! Not to mention the fact that your pages will load faster, since only one file is being called site-wide. :)</p>
<p><small>p.s. If you copy/paste the snippets above don&#8217;t forget to remove the spaces.</small>
<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdesignadaptations.com%2Ftutorials%2Fuse-conditional-tags-to-empower-your-content%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdesignadaptations.com%2Ftutorials%2Fuse-conditional-tags-to-empower-your-content%2F&amp;source=feistyred&amp;style=compact&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://designadaptations.com/notebook/?ak_action=api_record_view&id=297&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://designadaptations.com/tutorials/use-conditional-tags-to-empower-your-content/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Add a Tabbed Content Section to Your Blog</title>
		<link>http://designadaptations.com/tutorials/how-to-add-a-tabbed-content-section-to-your-blog/</link>
		<comments>http://designadaptations.com/tutorials/how-to-add-a-tabbed-content-section-to-your-blog/#comments</comments>
		<pubDate>Thu, 04 Oct 2007 14:00:40 +0000</pubDate>
		<dc:creator>Charity</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://designadaptations.com/notebook/how-to-add-a-tabbed-content-section-to-your-blog/</guid>
		<description><![CDATA[If you&#8217;re a consistent blogger who has surpassed the 6 month mark, you&#8217;ve likely built up a notable resource for your visitors. Eventually, rotating older content in becomes a challenge. A few months ago I wrote about ways to bring &#8230; <a href="http://designadaptations.com/tutorials/how-to-add-a-tabbed-content-section-to-your-blog/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a consistent blogger who has surpassed the 6 month mark, you&#8217;ve likely built up a notable resource for your visitors. Eventually, rotating older content in becomes a challenge. A few months ago I wrote about ways to <a title="Bring Dead Posts to Life" href="http://designadaptations.com/notebook/bring-dead-posts-to-life/">bring dead posts to life</a>, and <a title="5 Ways to Sticky Up Your Blog" href="http://designadaptations.com/notebook/5-ways-to-sticky-up-your-blog/">5 ways to sticky up your blog</a>, but adding a tabbed interface is another (very clever) option for showing off your work.</p>
<p>Tabbed interfaces are easy to come by. In fact, Smashing Magazine has <a title="14 tab-based interfaces" href="http://www.smashingmagazine.com/2007/04/18/14-tab-based-inferface-techniques/">an excellent list</a> put together. Most <em>appear</em> to be easy to implement, but I&#8217;m unlucky when it comes to scripting so I blundered around a bit before I found one I could use without inducing a migraine. I finally settled on <a title="DomTab" href="http://onlinetools.org/tools/domtabdata/">domTab</a>, by <a title="OnlineTools.org" href="http://onlinetools.org/#tools">OnlineTools.org</a>.</p>
<p>Once you&#8217;ve downloaded the files, you&#8217;ll need to add the script to header.php. If you&#8217;re running a WordPress blog, don&#8217;t bother copy/pasting the script on domTab&#8217;s instruction page. It doesn&#8217;t work. Instead, use WP&#8217;s <a title="WP Template Tags - Bloginfo" href="http://codex.wordpress.org/Template_Tags/bloginfo">bloginfo template tag</a>. The final result should look like this:</p>
<pre>&lt; script type="text/javascript"
 src="&lt; ?php bloginfo('template_directory'); ? &gt;/js/domtab.js" &gt;
&lt; /script&gt;</pre>
<p>Note that I put the javascript into its own folder (within the theme folder) specifically named <strong>js</strong>. You don&#8217;t have to do this, but I&#8217;m picky about file structure. :) Ok, now that you&#8217;ve got the script linked, just add your content, and style it up. Because domTab is basically an unordered list, styling is easily done using the class and ID hooks provided. There&#8217;s even a sample CSS file in the download which you can use to get started. Here&#8217;s a screenshot of what I came up with:</p>
<p><img src="http://s40608.gridserver.com/notebook/wp-content/uploads/2007/10/best_of.jpg" alt="" /></p>
<p>Now, where to put it? The index page is a no-brainer, but I suggest using it as a follow-up to your most recent post. Depending on how your theme is laid out, look for a variant of the following snippet, and simply paste your list in after it (or it&#8217;s closing div).</p>
<pre>&lt; ?php comments_popup_link('Post a Comment'); ?&gt;</pre>
<p>Of course, precise control over content (without manual entry) carries a lot of appeal for most bloggers, so what if you could automate some of the content in your tabs? Tying on a plugin like <a title="Top Posts by Category plugin" href="http://www.macalua.com/2007/02/01/top-posts-by-category-plugin/">Top Posts by Category</a>, you could display your most popular entries dynamically. Just call the function from within your list:</p>
<pre>&lt; div &gt;
	&lt; h2 &gt;&lt; a name="popular" id="popular"&gt;Most Popular&lt; /a&gt;&lt; /h2 &gt;
	&lt; ?php tpbc_list ();? &gt;
&lt; /div &gt;</pre>
<p><strong>Edit:</strong> <small>(10/12/07)</small> A plugin which works a little better with this idea is <a title="Alex King's WordPress Plugins" href="http://alexking.org/projects/wordpress">Popularity Contest</a>. It can be used to power more tabs, such as most popular by category and/or month, in addition to all time. Using this plugin instead also allows you to configure the TPBC plugin to calculate popularity by most commented, thereby automating another tab. (TPBC can be configured to show popular entries by visits <em>or</em> comments, not both.)</p>
<p><strong>Note:</strong> If you c/p any of the code excerpts above, don&#8217;t forget to remove the spaces. Oh and be sure to drop in the snippet for preventing the flash before the script renders the content properly (found in the How to Style a <a title="domTabs" href="http://onlinetools.org/tools/domtabdata/">domTa</a>b section).</p>
<p>Believe it or not, that&#8217;s it!
<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdesignadaptations.com%2Ftutorials%2Fhow-to-add-a-tabbed-content-section-to-your-blog%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdesignadaptations.com%2Ftutorials%2Fhow-to-add-a-tabbed-content-section-to-your-blog%2F&amp;source=feistyred&amp;style=compact&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://designadaptations.com/notebook/?ak_action=api_record_view&id=295&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://designadaptations.com/tutorials/how-to-add-a-tabbed-content-section-to-your-blog/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
