<?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>darrinb.com</title>
	<atom:link href="http://darrinb.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://darrinb.com</link>
	<description>This is the personal blog and portfolio of Darrin Boutote, a business–development consultant and web developer based in the Chicago area. I hope you enjoy, and if you have any comments or questions—or are looking to begin a project—feel free to drop me a line.</description>
	<lastBuildDate>Fri, 13 Aug 2010 20:38:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/</generator>
		<item>
		<title>WP True Typed &#8212; a WordPress Plugin to Fight Comment Spam</title>
		<link>http://darrinb.com/notes/2010/wp-true-typed/</link>
		<comments>http://darrinb.com/notes/2010/wp-true-typed/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 20:43:27 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[wp-plugin]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=756</guid>
		<description><![CDATA[<p>This is the official plugin page for WP True Typed, an anti-spam plugin to protect your site from comment spam.</p>]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2010/wp-true-typed/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Plugin Released: WP Post Encode</title>
		<link>http://darrinb.com/notes/2010/plugin-released-wp-post-encode/</link>
		<comments>http://darrinb.com/notes/2010/plugin-released-wp-post-encode/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 19:12:49 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=824</guid>
		<description><![CDATA[<p>WP Post Encode&#8211;a WordPress plugin geared toward authors who write a lot about code in their posts&#8211;was recently released and is now available in the <a href="http://wordpress.org/extend/plugins/wp-post-encode/">WordPress Plugin Repository</a>.</p>

<p>The aim of the plugin is to allow authors to inlcude raw code such as HTML, PHP, JavaScript, etc., in their posts by providing them with an encode filter that will encode any code/markup language they wrap in special quicktags.</p>

<p>To learn more about the plugin, click here: <a href="http://darrinb.com/notes/2010/wp-post-encode/">WP Post Encode</a>.</p>]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2010/plugin-released-wp-post-encode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP Post Encode &#8212; a WordPress Plugin for Including Raw Code in Posts</title>
		<link>http://darrinb.com/notes/2010/wp-post-encode/</link>
		<comments>http://darrinb.com/notes/2010/wp-post-encode/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 15:37:21 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[wp-plugin]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=706</guid>
		<description><![CDATA[<p>This is the official plugin page for WP Post Encode, a WordPress plugin for including raw code in your posts.</p>]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2010/wp-post-encode/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding and Filtering Raw HTML in WordPress Posts</title>
		<link>http://darrinb.com/notes/2010/adding-and-filtering-raw-html-in-wordpress-posts/</link>
		<comments>http://darrinb.com/notes/2010/adding-and-filtering-raw-html-in-wordpress-posts/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 13:09:59 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[WordPress Development]]></category>
		<category><![CDATA[wp-function]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=588</guid>
		<description><![CDATA[<p>How to avoid manually encoding code in WordPress posts.</p>]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2010/adding-and-filtering-raw-html-in-wordpress-posts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Digging Into the WordPress functions.php File</title>
		<link>http://darrinb.com/notes/2010/digging-into-the-wordpress-functions-php-file/</link>
		<comments>http://darrinb.com/notes/2010/digging-into-the-wordpress-functions-php-file/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 13:53:52 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[WordPress Development]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[wp-function]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=619</guid>
		<description><![CDATA[<p>In this article, we&#8217;ll discuss some recommended useful functions to include in your WordPress &#8220;functions.php&#8221; file.</p>]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2010/digging-into-the-wordpress-functions-php-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a Custom ID to the Body Element in WordPress</title>
		<link>http://darrinb.com/notes/2010/adding-a-custom-id-to-the-body-element-in-wordpress/</link>
		<comments>http://darrinb.com/notes/2010/adding-a-custom-id-to-the-body-element-in-wordpress/#comments</comments>
		<pubDate>Mon, 31 May 2010 18:03:53 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[WordPress Development]]></category>
		<category><![CDATA[wp-function]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=600</guid>
		<description><![CDATA[<p>In this article we&#8217;ll discuss an easy way to add a custom, dynamic ID to the body element on your WordPress Posts and Pages</p>]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2010/adding-a-custom-id-to-the-body-element-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Customizing the WordPress body_class() Function</title>
		<link>http://darrinb.com/notes/2010/customizing-the-wordpress-body_class-function/</link>
		<comments>http://darrinb.com/notes/2010/customizing-the-wordpress-body_class-function/#comments</comments>
		<pubDate>Thu, 20 May 2010 16:58:28 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[WordPress Development]]></category>
		<category><![CDATA[wp-function]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=591</guid>
		<description><![CDATA[<p>In this article we'll discuss a short script to add custom classes to the body element of your WordPress page template.</p>]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2010/customizing-the-wordpress-body_class-function/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Girls Just Wanna Run 5k Race</title>
		<link>http://darrinb.com/notes/2010/girls-just-wanna-run-5k-race/</link>
		<comments>http://darrinb.com/notes/2010/girls-just-wanna-run-5k-race/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 22:58:55 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=258</guid>
		<description><![CDATA[<p>A client (and friend) of mine and her organization are hosting an awesome fund-raising event coming up in April; the first annual &#8220;Girls Just Wanna Run&#8221; 5K race!</p>]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2010/girls-just-wanna-run-5k-race/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Paginate a Custom WordPress Query Loop</title>
		<link>http://darrinb.com/notes/2009/how-to-paginate-a-custom-wordpress-query-loop/</link>
		<comments>http://darrinb.com/notes/2009/how-to-paginate-a-custom-wordpress-query-loop/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 00:25:17 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[WordPress Development]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=573</guid>
		<description><![CDATA[<p>On a recent project for a client, I needed a way to have a WordPress Page contain both static content editable by the client, and dynamic content added/updated every time they made a new Post.  Additionally, the dynamic content had to be paginated.</p>

<p>Ultimately the goal was to a have a Page with introductory text that could be edited by the client but that also served up a list of posts tagged with a certain tag.  Like so:</p>

<img src="http://darrinb.com/media/AV12-donor.png" alt="" title="AV12-donor" width="600" height="300" class="alignnone size-full wp-image-575" />

<p>Initially the concept was easy enough&#8212;create a new Page with multiple loops.  The first loop would be the main query that pulled the static content while a secondary, <em>custom</em> loop query pulled posts with a specific tag.</p>

<p><em>The challenge lay in the fact that the static content would always be one page long, whereas the dynamic content might eventually grow into a really long list of posts that would need to be paginated.</em></p>

<p>So how do we go about creating a paging system that would move through the dynamically&#8208;generated list of  posts?  By re&#8208;defining the <code>$wp_query</code> object.</p>

<h2>The <code>$wp_query</code> Object</h2>

<p><code>$wp_query</code> is the global variable that receives the parameters for a WordPress Page/Post query.  Once it gets this information, it attempts to pull the appropriate content from your data base.  If you&#8217;re calling a WordPress Page, it will show the content from the Page (the text/images you enter in the Page editor when you create a new Page).  If you&#8217;re calling a Post, it will pull the information for that post (or posts).</p>

<p><code>$wp_query</code> receives this information from the WP_Query Class (WP v2.0+).  The <a href="http://codex.wordpress.org/Function_Reference/WP_Query">Codex Page</a> on the <code>WP_Query</code> Class goes into detail on how the WP_Query Class functions, but the short of it is that this Class is the magic that makes the content appear on your blog, whether that content is in a Post or in a Page.</p>

]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2009/how-to-paginate-a-custom-wordpress-query-loop/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Opening External Links in a New Window Using jQuery</title>
		<link>http://darrinb.com/notes/2009/opening-external-links-in-a-new-window-using-jquery/</link>
		<comments>http://darrinb.com/notes/2009/opening-external-links-in-a-new-window-using-jquery/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 23:49:27 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[WordPress Development]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=562</guid>
		<description><![CDATA[<p>In this article we&#8217;ll discuss working with external links and the semantically correct, user&#8208;friendly, developer&#8208;friendly way to get them to open in a new window or tab using the jQuery library and a small jQuery script.  Additionally, we&#8217;ll review how to implement this in a WordPress installation.</p>

<p>Linking to external resources/documents is a the very idea behind the internet and bread and butter of search engines everywhere.  However, handling external links (that open in a new window/tab) in a user&#8208;friendly way can be somewhat of a pain.</p>

<p>Recently, I&#8217;ve been looking for a developer&#8208;friendly (read: &#8220;easy&#8221;) way to handle external links on this site as I tend to reference external resources quite a bit in posts and articles.  In the old days, you could specify where an external link would open by placing the <code>target="_blank"</code> attribute within the link like so:</p>

<pre>
&lt;a href=&quot;document_url&quot; target=&quot;_blank&quot;&gt;This is an external link&lt;/a&gt;
</pre>

<p>However, with the removal of the <code>target=</code> attribute in HTML 4.0, this is no longer valid markup.  As Kevin Yank from from Sitepoint states:</p>

<blockquote cite="http://www.sitepoint.com/article/standards-compliant-world/">
    <p>The HTML 4.0 specification took away the <code>target</code> attribute, but it added another attribute: <code>rel</code>. This attribute is intended to specify the relationship between the document that contains the link, and the target of the link. The specification defines a bunch of standard values for this attribute (e.g. <code>next</code>, <code>previous</code>, <code>chapter</code>, <code>section</code>), most of which have to do with relationships between small sections of a larger document. However, the spec leaves the developer free to use nonstandard values for site&#8208;specific purposes.</p>
</blockquote>

<p>To stay standards&#8208;compliant (because that&#8217;s what good web developers  do, right?) we can now markup external links using the <code>rel</code> attribute link so:</p>

<pre>
&lt;a href=&quot;document_url&quot; rel=&quot;external&quot;&gt;This is an external link&lt;/a&gt;
</pre>

<p>That&#8217;s all fine and well, but what if you&#8217;re <del datetime="2009-07-05T15:32:50+00:00">lazy</del> busy?  And you either forget to mark your external links with <code>rel="external"</code>, or you&#8217;re updating an old site that you&#8217;ve converted to XHTML Strict?  What&#8217;s more, how do you go about alerting your visitors that the link they&#8217;re about to click on will open in a new window?  (Because that is the polite&#8212;and user&#8208;friendly&#8212;thing to do).  Fortunately with jQuery it&#8217;s easy!</p>

<p>First and foremost, the best way to handle external links is to write them properly from the beginning.  This means marking them up with the <code>rel="external"</code> attribute and including a <code>title</code> attribute with an alert that the link will open in a new tab/window.  In reality this doesn&#8217;t happen all the time, so we can use jQuery to handle some of this for us.</p>

<h2>Solutions&#8230;and Issues</h2>

<h3>First Solution</h3>

<p>The first <a href="http://www.badlydrawntoy.com/2008/10/23/xhtml-strict-target-resolved-with-jquery/" title="external link">solution</a> I came across used jQuery to find external links with the <code>rel="external"</code> attribute and add a <code>target="_blank"</code> attribute to each one.  There are a few issues with this solution:</p>

<ol>
    <li>It relies on the author to remember to add  <code>rel="external"</code> to each external link</li>
    <li>It adds a <code>target="_blank"</code> to each link, which is no longer standards&#8208;compliant.</li>
    <li>It relies on the author to remember to add a <code>title</code> attribute with an alert about a new window opening.</li>
    <li>It broke if the <code>rel</code> attribute had more than one value, such as <code>rel="external nofollow"</code></li>
</ol>

<h3>Second Solution</h3>

<p>The second <a href="http://www.badlydrawntoy.com/2009/03/03/replacing-target_blank-for-strict-xhtml-using-jquery-redux/" title="external link">solution</a> I came across fixed some of the issues of the first by re&#8208;writing the regex to account for additional values in <code>rel</code> attributes and no longer adding <code>target="_blank"</code> attribute to the external links.  Further, it removed the need for <code>rel="external"</code> all together by matching all links that started with &#8220;<code>http://</code>&#8221;, under the assumption all internal links use relative paths and external links use absolute paths like so:</p>

<ul>
    <li>A typical internal link: <code><a href="/contact_page"></code></li>
    <li>A typical external link: <code><a href="http://www.sitename.com/contact_page"></code></li>
</ul>

<p>There are still a few issues with this solution:</p>

<ol>
    <li>Assuming only external links have absolute urls can become problematic.  (CMS&#8217; such has WordPress generate absolute urls for internal links within a site.)</li>
    <li>You&#8217;re still relying on the author to include a <code>title</code> attribute alerting the visitor of a new window opening.</li>
</ol>

<h3>Third Solution</h3>

<p>Yet another <a href="http://wpcult.com/open-external-links-in-a-new-window/">solution</a> approached from a different angle and basically adds a <code>target="_blank"</code> attribute to all links that do not start with the site&#8217;s own domain name, nor point to an internal anchor with an <code>href</code> value of &#8220;#&#8221;.</p>

<p>The issues with this solution are the same as the prior two; relying on the author for the <code>title</code> attribute, and utilizing the <code>target</code> attribute.  Additionally, it also adds the additional step of requiring the author to change the script to add his/her own domain name.  Testing it, I found it broke if you typed &#8220;www.domainname.com&#8221; in your script, but not &#8220;domainname.com&#8221; in your link; or vice&#8208;versa.</p>

<p>Ultimately I was looking for the most developer&#8208;friendly, standards&#8208;compliant, user&#8208;friendly way to handle these external links.  On the next page we&#8217;ll review the solution I came up with.</p>

]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2009/opening-external-links-in-a-new-window-using-jquery/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>And the Winner&#8217;s Are&#8230;</title>
		<link>http://darrinb.com/notes/2009/and-the-winners-are/</link>
		<comments>http://darrinb.com/notes/2009/and-the-winners-are/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 20:08:19 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=559</guid>
		<description><![CDATA[<p>The results are in for the 2009 Reader&#8217;s Choice Web Design contest from About.com!  This was the inaugural year for these awards with nominations being received from around the world.  Contestants competed in nine categories ranging from Best Use of Color to Best Overall Design.</p>

<p>This site&#8217;s <strong>Web Development Questionnaire</strong> was nominated for the <strong>Best Form Design</strong> category and ended up winning with 45% of the total votes!  Thanks to all who voted!!</p>

<p>As Jennifer Kyrnin (About.com Web Design Guide) states :</p>

<blockquote cite="href="http://webdesign.about.com/od/awards/ig/rcwd09_winners/">
    <p>&#8220;Forms are challenging to build well and not a lot of thought is given to their design.&#8221;</p>
</blockquote>

<p>Which is all too true; what started off as a simple form, turned into a complex project complete with usability/accessibility issues as well as cross&#8208;browser bugs (thanks <abbr title="Internet Explorer 6">IE6</abbr>) and lots of hair&#8208;pulling.  It employs the jQuery library for certain form functions such as pagination, validation, user interaction, and various aesthetics such as screen scrolling. It also employs a custom PHP script for data verification and validation, as well as MySQL for data storage. It&#8217;s cross-browser compatible and validates to the XHTML 1.1 standard.</p>

<p>This form started off as a necessity for gathering information, but ended up turning into a labor of love.  I plan on releasing the source code of the form, along with its PHP validation script and jQuery scripts, under a GPL in the coming weeks as well as writing a tutorial on its actual build out.</p>

<p>To see a gallery of all the winners, you can follow the link here: <a href="http://webdesign.about.com/od/awards/ig/rcwd09_winners/">Winners: Reader&#8217;s Choice Awards: Web Design</a>.</p>

<p>Again, thanks to all those who voted and participated in the contest and congratulations to all the other winners!!</p>]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2009/and-the-winners-are/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Design Reader&#8217;s Choice Awards 2009</title>
		<link>http://darrinb.com/notes/2009/web-design-readers-choice-awards-2009/</link>
		<comments>http://darrinb.com/notes/2009/web-design-readers-choice-awards-2009/#comments</comments>
		<pubDate>Tue, 05 May 2009 19:58:10 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=556</guid>
		<description><![CDATA[<p>2009 marks the first annual <strong>About.com Web Design Reader&#8217;s Choice Awards</strong>.  Nominations were accepted through the end of April in a variety of categories ranging from &#8220;Best Use of Color&#8221; to &#8220;Most Original Design&#8221;.</p>

<p>10 nominees per category were chosen and a gallery for each category was created with screen shots of the sites and links to the respective urls.</p>

<p>This year&#8217;s nominees include such powerhouse websites as Apple.com, Amazon.com, and Twitter.com, along with independent web design firms, individuals&#8217; sites, and ecommerce sites.  (And since the blog section of this site is powered by WordPress, I should point out that Matt Mullenweg, founding developer of WordPress, was nominated for one of the categories.)</p>

<p>Yours truly is one of the nominees for the &#8220;Best Form Design&#8221; category for the <em>Web Development Questionnaire</em> I created to use on this site, and since this is my site, here comes the shameless plug!</p>

<p>The Web Development Questionnaire I created allows potential clients to contact me with all the pertinent information needed to get the ball rolling on a new web development project.  It employs the jQuery library for certain form functions such as pagination, validation, user interaction, and various aesthetics such as screen scrolling.  It also employs a custom PHP script for data verification and validation as well as MySQL for data storage.  It&#8217;s cross-browser compatible and validates to the XHTML 1.1 standard.</p>

<p>You can see a screen shot of the form <a href="http://webdesign.about.com/od/awards/ig/Reader-s-Choice-2009---Form/RC09-Form--Martinish.htm">here</a> on Jennifer&#8217;s Blog on About.com, or you can view the actual form on this site <a href="http://www.martinish.com/contact/web-development-questionnaire">here</a>.</p>

<p>May 4th marked the beginning of the voting period with voting open to everyone.  Jennifer Kyrnin, the About.com Web Design Guide overseeing the contest, encourages each nominee to encourage their friends, family, and clients to vote, so go out there and vote!  For more information on voting, see Jennifer&#8217;s post <a href="http://webdesign.about.com/b/2009/05/04/readers-choice-awards-its-time-to-vote.htm"  title="About.com 2009 Web Design Reader&#8217;s Choice Awards Voting Instructions">here</a>.</p>

<p>This year&#8217;s categories are as follows:</p>
<ul>
<li><a href="http://webdesign.about.com/od/awards/ig/Reader-s-Choice-2009---Colors/RC09-Colors--Abduzeedo.htm" title="click here to vote in this category">Best Use of Colors in Web Design</a></li>
<li><a href="http://webdesign.about.com/od/awards/ig/Reader-s-Choice-2009---Images/RC09-Images--MSNBC.htm" title="click here to vote in this category">Best Use of Images in Web Design</a></li>
<li><a href="http://webdesign.about.com/od/awards/ig/Reader-s-Choice-2009---Form/RC09-Form--Elwood.htm" title="click here to vote in this category">Best Form Design</a></li>
<li><a href="http://webdesign.about.com/od/awards/ig/Reader-s-Choice-2009---Info/RC09-Info--Animated-Ed.htm" title="click here to vote in this category">Best Information Page Design</a></li>
<li><a href="http://webdesign.about.com/od/awards/ig/Reader-s-Choice-2009---Prod/RC09-Prod--Ikea.htm" title="click here to vote in this category">Best Product Page Design</a></li>
<li><a href="http://webdesign.about.com/od/awards/ig/Reader-s-Choice-2009---Ecom/RC09-Ecom--Amazon.htm" title="click here to vote in this category">Best Ecommerce Site Design</a></li>
<li><a href="http://webdesign.about.com/od/awards/ig/Reader-s-Choice-2009---Orig/RC09-Orig--Apple.htm" title="click here to vote in this category">Most Original Design</a></li>
<li><a href="http://webdesign.about.com/od/awards/ig/Reader-s-Choice-2009---Web-Des/RC09-Web-Des--Busy-B.htm" title="click here to vote in this category">Best Designed Web Designer&#8217;s Site</a></li>
<li><a href="http://webdesign.about.com/od/awards/ig/Reader-s-Choice-2009---Overall/RC09-Overall--Adidas.htm" title="click here to vote in this category">Best Overall Web Design</a></li>
</ul>

<p>Voting is open until May 22, 2009 with the results released on May 25, 2009.  Check back here or on Jennifer&#8217;s <a href="http://webdesign.about.com/b/">blog</a> to see the results!</p>

<p>Good luck to all the nominees!</p>]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2009/web-design-readers-choice-awards-2009/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Excluding Certain Posts Or Pages From Search Results In WordPress</title>
		<link>http://darrinb.com/notes/2009/excluding-certain-posts-or-pages-from-search-results-in-wordpress/</link>
		<comments>http://darrinb.com/notes/2009/excluding-certain-posts-or-pages-from-search-results-in-wordpress/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 19:34:54 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[WordPress Development]]></category>
		<category><![CDATA[wp-function]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=552</guid>
		<description><![CDATA[<p>I recently needed a way to exclude certain posts and pages from showing up in WordPress search results.  The purpose was to exclude certain posts tagged with certain key-words and all non-post Pages from showing up in the results.</p>

<p>The current cproject I&#8217;m working on involves using some posts in a non&#8208;traditional manner.  They are not meant to be read as traditional posts in the blog section of his site and therefore should not be included in search results.  These posts are all tagged with a specific keyword tag that&#8217;s utilized by a custom WP <code>get_posts()</code> call that displays them in the site&#8217;s header.  The whole idea was that these posts with certain tags should be excluded from the search results because they hold no relevance for the site&#8217;s readers.  And, since I&#8217;m using WP as a <acronym title="Content Management System">CMS</acronym> to manage the client&#8217;s site, I also realized I needed the same functionality to exclude Pages from the search results as well.</p>

<p>I did a few searches in the WP forums and on Google and found a few solutions, but none of them worked perfectly for my purposes.  The first required throwing a conditional <code>if statement</code> in the Loop on the search results page, essentially removing whatever post or page you wanted to exclude.  The second (and this is the one I found the most) involved creating a filter function and hooking it to a WP filter hook.</p>

<p>I chose the second method since I don&#8217;t like the idea of retrieving <em>all</em> the information and then looping it through an <code>if statement</code> to cull what I need.  The second method, a filter, seems cleaner.</p>

<h2>Getting Started</h2>

<p>Instead of just throwing the code out there, I figured it&#8217;d be best if I showed, step by step, how to accomplish this so you can implement it on your own site.  Basically we&#8217;re doing the following:</p>
<ol>
    <li>Intercepting the main <a href="http://codex.wordpress.org/Function_Reference/WP_Query">WP query</a>.</li>
    <li>Checking to see if it&#8217;s a search query.</li>
    <li>Adding our filter to the query before it retrieves data from the database.</li>
</ol>

<p>In it&#8217;s most simple form this is what it looks like:</p>

<pre>
&lt;?php
function FunctionName($query) {
    if ($query-&gt;is_search) {
    $query-&gt;set($query_var, $value);
    };
    return $query;
};

add_filter(&#039;filter_hook&#039;,&#039;FunctionName&#039;);
?&gt;
</pre>

<p>I&#8217;m not going to go into too much detail about WordPress filters in general, and how they work since the Codex <a href="http://codex.wordpress.org/Plugin_API#Filters">page</a> on them provides a lot of information.  Instead, let&#8217;s focus on how this particular filter function works.  But if you&#8217;re interested in learning more, be sure to check the Codex out.</p>

<h2>How It Works</h2>

<p>In order to understand how the function&#8211;and subsequently our filter&#8211;works, we need to first understand how WP processes a search request.  The Codex page on the <a href="http://codex.wordpress.org/Function_Reference/WP_Query">WP_Query Class</a> provides some great information on the Methods and Properties of it, but unless you&#8217;re familiar with PHP, it may seem a bit foreign.  What we&#8217;re looking for specifically is what variables WP uses to pull the search results, because after all, these are the results we want to manipulate.</p>

<p>The following is a list of the query variables WP uses to pull search results:</p>

<pre>
Array (
    &#91;s] =&gt;
    &#91;error] =&gt;
    &#91;m] =&gt;
    &#91;p] =&gt;
    &#91;post_parent] =&gt;
    &#91;subpost] =&gt;
    &#91;subpost_id] =&gt;
    &#91;attachment] =&gt;
    &#91;attachment_id] =&gt;
    &#91;name] =&gt;
    &#91;hour] =&gt;
    &#91;static] =&gt;
    &#91;pagename] =&gt;
    &#91;page_id] =&gt;
    &#91;second] =&gt;
    &#91;minute] =&gt;
    &#91;day] =&gt;
    &#91;monthnum] =&gt;
    &#91;year] =&gt;
    &#91;w] =&gt;
    &#91;category_name] =&gt;
    &#91;tag] =&gt;
    &#91;cat] =&gt;
    &#91;tag_id] =&gt;
    &#91;author_name] =&gt;
    &#91;feed] =&gt;
    &#91;tb] =&gt;
    &#91;paged] =&gt;
    &#91;comments_popup] =&gt;
    &#91;meta_key] =&gt;
    &#91;meta_value] =&gt;
    &#91;preview] =&gt;
    &#91;category__in] =&gt; Array ()
    &#91;category__not_in] =&gt; Array()
    &#91;category__and] =&gt; Array()
    &#91;post__in] =&gt; Array()
    &#91;post__not_in] =&gt; Array()
    &#91;tag__in] =&gt; Array()
    &#91;tag__not_in] =&gt; Array()
    &#91;tag__and] =&gt; Array()
    &#91;tag_slug__in] =&gt; Array()
    &#91;tag_slug__and] =&gt; Array()
    &#91;post_type] =&gt;
    &#91;caller_get_posts] =&gt;
    &#91;suppress_filters] =&gt;
    &#91;posts_per_page] =&gt;
    &#91;nopaging] =&gt;
    &#91;comments_per_page] =&gt;
    &#91;search_terms] =&gt; Array()
    &#91;order] =&gt;
    &#91;orderby] =&gt;
    )
</pre>    


<p>I won&#8217;t go into all of them now, instead let&#8217;s focus on excluding Pages from search results and only include Posts, since that seems to be a pretty popular request.  For that, we&#8217;ll need to use the <code>post_type</code> query variable.  (WordPress assigns a value of either &#8220;post&#8221; or &#8220;page&#8221; to this variable when you create either a blog Post or a Page.)</p>

<p>Now that we have the variable we need, let&#8217;s set our function up.  Open your &#8220;<code>functions.php</code>&#8221; file (located in your theme directory), or create one if your theme doesn&#8217;t have one, and add the following:</p>

<pre>
&lt;?php
function mySearchFilter($query) {
    if ($query-&gt;is_search) {
        $query-&gt;set(&#039;post_type&#039;, &#039;post&#039;);
    };
    return $query;
};

add_filter(&#039;pre_get_posts&#039;,&#039;mySearchFilter&#039;);
?&gt;
</pre>

<p>What this does is instruct WordPress to check if we&#8217;re on a Search Results page:</p>

<pre>if ($query-&gt;is_search)</pre>

<p>if we are, run it&#8217;s search query only on posts:</p>

<pre>$query-&gt;set(&#039;post_type&#039;, &#039;post&#039;);</pre>

<p><em>before</em> it pulls posts from the database:</p>

<pre>add_filter(&#039;pre_get_posts&#039;,&#039;mySearchFilter&#039;);</pre>

<p>WordPress will now exclude any <em>Pages</em> from its query and only search <em>Posts</em>.  To activate this, just save your &#8220;<code>functions.php</code>&#8221; file and upload it back to your theme directory.  Or if you&#8217;re using the built&#8208;in Editor in your WP Admin Section (Appearance&rarr;Editor&rarr;Theme Functions) add the function, then click the &#8220;Update File&#8221; button.</p>

<h2>Conclusion and References</h2>

<p>Using the query variables listed above you can customize your search results in a variety of ways.  You can search specific Categories, exclude posts with certain tags, specify to search only specific posts, etc.  In a later article I&#8217;m going to demonstrate a way to exclude Posts tagged with specific tags.</p>

<p>If you&#8217;re interested in learning more, I encourage you to read the following Codex pages:</p>
<ul>
    <li>The Function Reference on the WP_Query Class, the fundamental function that powers the WP query.  <a href="http://codex.wordpress.org/Function_Reference/WP_Query">Link</a>.</li>
    <li>The Plugin API on Filters.  <a href="http://codex.wordpress.org/Plugin_API#Filters">Link</a>.</li>
    <li>The parameters for the <code>query_posts()</code> Template Tag. It&#8217;s not an exhaustive list, but touches on the most common ones.  These are the same parameters as the query variables noted above.  <a href="http://codex.wordpress.org/Template_Tags/query_posts#Parameters">Link</a>.</li>
</ul>]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2009/excluding-certain-posts-or-pages-from-search-results-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>WP Columnize &#8212; a WordPress Plugin for Creating Columns in Posts</title>
		<link>http://darrinb.com/notes/2008/wp-columnize-a-wordpress-plugin-for-creating-columns-in-posts/</link>
		<comments>http://darrinb.com/notes/2008/wp-columnize-a-wordpress-plugin-for-creating-columns-in-posts/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 15:33:56 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[wp-plugin]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=543</guid>
		<description><![CDATA[<p>This WordPress plugin allows you to easily create multiple columns within your posts.  It&#8217;s perfect for breaking up large blocks of text in a magazine or newspaper&#8208;style format. Formatting your content into a multi-column layout breaks the uniformity of a long post and adds visual appeal to an otherwise large block of text.</p>

<p>Whats more this plugin is incredibly user&#8208;friendly, as everything is controlled with CSS and 2 custom quicktags.</p>

<h2>Example Output:</h2>



<p>From this example you can see what&#8217;s possible with this plugin; giving you the ability to create a newspaper or magazine&#8208;style layout within your blog or specific posts.  It&#8217;s easy to switch between multiple columns and full-width blocks of text such as this paragraph.</p>

<p>The formatting is controlled purely by CSS using two classes; &#8220;<code>column-sect</code>&#8221; and &#8220;<code>post-column</code>&#8221;, allowing you to customize it any way you&#8217;d like. Simply add these two classes to your style sheet and adapt them to your theme.</p>

<h2 id="install">Installation</h2>

<ol>
    <li><a href="http://downloads.wordpress.org/plugin/wp-columnize.zip" title="Will download from WordPress.org">Download</a> the &#8220;<code>mish_wp_columnize.zip</code>&#8221; folder, then extract.</li>
    <li>Upload the uncompressed folder to your plugin directory (<code>wp-content/plugins</code>).</li>
    <li>Activate the plugin through your Admin Dashboard.</li>
    <li>Add the following classes to your style sheet: &#8220;<code>column-sect</code>&#8221;, &#8220;<code>post-column</code>&#8221; and set their values.</li>
</ol>

<h2>Parameters</h2>

<p>None.  <em>Yet.</em></p>

<h2>Usage</h2>

<p><em>It&#8217;s recommended you use the HTML editor when writing posts with columns.</em>  The WP Columinzer plugin installs two quicktag buttons in the toolbar of HTML editor for your convenience.</p>

<p><strong>To use:</strong> Simply wrap whatever you would like to appear in a <strong>column</strong> in the following tags: &#8220;<code>&#91;/col-sect]

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; a value of &amp;#8220;&lt;code&gt;inline-block&lt;/code&gt;&amp;#8221; must be set on the containing &lt;code&gt;&lt;!--encode--&gt;&lt;div&gt;</code> in order for it to display properly in IE6.  Also, setting &#8220;<code>display:inline</code>&#8221; on &#8220;<code>.post-column</code>&#8221; prevents the <a href="http://www.positioniseverything.net/explorer/floatIndent.html" title="tutorial on IE float/margin errors at positioniseverything.net">doubling bug</a> in IE6.

<h3>Example 1</h3>

<p>You can put columns on one line:</p>

<pre>

</pre>

<h3>Example 2</h3>

<p>Or you could put each element on its own line. (Easier to read your markup this way.)</p>

<pre>

</pre>

<h2>Notes</h2>

<p>This plugin has been tested using both the visual editor and the HTML editor in the dashboard and should work as expected.  However there isn&#8217;t a quicktag button for the Visual editor.</p>

<p>The plugin also attempts to accommodate for the <code>&lt;br /&gt;</code> tags WP adds when you hit &#8220;enter&#8221; while typing a post, but extensive testing hasn&#8217;t been done to test for extreme circumstances.</p>

It&#8217;s recommended to use the HTML editor on posts where you&#8217;d like to use a multi&#8221;column format, as the TinyMCE editor will strip the <code>/</code> tags.</p>

<p>Also, be sure to check the widths of any element you&#8217;re wrapping in the quicktags.  At this time, only one width can be set for the columns (since it&#8217;s set in your stylesheet), but future upgrades should address this.</p>

<p><strong>Safari Issue:</strong>  For some reason, Safari chokes if a heading (<code>&lt;h1&gt;</code>&#8211;<code>&lt;h6&gt;</code>) starts a column and sits on its own line. (It doesn&#8217;t float the columns).</p>

<p>So this is fine:</p>

<pre>
&#91;column]&lt;h3&gt;An Introduction&lt;/h3&gt;
</pre>

<p>While this isn&#8217;t:</p>

<pre>
&#91;column]
&lt;h3&gt;An Introduction&lt;/h3&gt;
</pre>

<p>This is something only noticed in Safari and only with <strong>headings</strong>, and only at the beginning of the first column.</p>

<h2 id="changelog">Updates</h2>

<p><strong>Current Version: 0.6.5</strong></p>

<p>Changelog:</p>

<ul>
    <li>v0.5 : December 11, 2008 : Initial release</li>
    <li>v0.6 : December 13, 2008 : Added shortcodes and additional filtering.</li>
    <li>v0.6.3 : December 16, 2008 : Added buttons to HTML editor toolbar</li>
    <li>v0.6.4 : December 18, 2008 : Made forward-compatible</li>
    <li>v0.6.5 : December 24, 2008 : Fixed auto-install button option</li>
</ul>]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2008/wp-columnize-a-wordpress-plugin-for-creating-columns-in-posts/feed/</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
		<item>
		<title>Common Issues In New Website Design</title>
		<link>http://darrinb.com/notes/2008/common-issues-in-new-website-design/</link>
		<comments>http://darrinb.com/notes/2008/common-issues-in-new-website-design/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 14:55:42 +0000</pubDate>
		<dc:creator>darrinb</dc:creator>
				<category><![CDATA[Content Development]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://darrinb.com/?p=538</guid>
		<description><![CDATA[<p>The following is primer on some common areas and issues often overlooked or not fully understood by an organization beginning its online presence.  These are some of the topics I discuss with new clients are just beginning their commercial online presence.</p>

<p>I&#8217;ll expand upon these topics in future posts, but for now let&#8217;s cover the basics.</p>

<h2>Content Development: Clear Understanding of Intent</h2>

<p>Web users skim, they do not read, and they will leave your site if they cannot understand the intention of your site withing <em>seconds</em> of viewing your pages.  Concise, descriptive, keyword-rich phrasing and terminology will not only encourage your visitor to read more (stay), but can also inform, and improve your <abbr title="Search Engine Optimization">SEO</abbr>.</p>

<h2>Content Development: Information For Your Visitors</h2>

<p class="hello"><span class="callout">Your site&#8217;s content is the catalyst to get your visitors to return to your site time and time again, and if you&#8217;re a business; to turn <em>potential</em> customers into <em>actual</em> customers.</span></p>

<p id="yup">Content development is not just the creation of the descriptive and informative text (and graphic) content on your site, but also deciding <em>what</em> to include on your site.  The information included should be developed with an emphasis on your target audience.  Any site created for a purpose other than personal communication (i.e. personal blog), should keep the visitor in mind when developing its content.</p>

<h2>Content Development: Quality <del>Over</del> <em>And</em> Quantity</h2>

<p>While content <em>is</em> king, bad content is… <em>not</em>.  Website owners should not cut corners on the quality of content for their sites.  Often, budgets are geared more for the design of the graphical content (images, graphics, icons) rather than the development of quality [text] content.</p>

<p>Unless you are creating a portfolio site to display artwork, visitors to your site are looking for <em>information</em>; be that educational or commercial (i.e. product purchases).  Part of your budget should be designated toward content development that will draw your visitor in and persuade them to return.</p>

<p>Simply stuffing your site with as much textual information (copy) as possible is not &#8220;content development&#8221;.  Quality information that your visitor wants is much more effective than an abundance of minimal-quality content that the [potential] customer doesn&#8217;t want.  Or need.</p>

<p>One other note:  The graphical appearance of your site does not assist in search engine placement; the textual content of your site <em>does</em>.</p>

<h2>Page Design: Consistent and Clear</h2>

<p>Textual content development is all fine and well, but the &#8220;fun&#8221; is in the graphics, color scheme, and layout of your site.  You want a site that not only gives your visitors the information they&#8217;re looking for, but one that looks great (for those with visual browsers) as well.  The theme of your site is what will catch your visitors eyes&#8217; and turn them from &#8220;visitors&#8221; into &#8220;readers&#8221; (and &#8220;buyers&#8221;).  A solid design philosophy&#8211;that captures the essence of your message&#8211;is the key to engaging the widest base of visitors.</p>

<p>The basis of good design starts with easy (to understand and use) site naviagtion and clear presentation of your information.  While (good) content is king (and the primary reason visitors are on your site), it&#8217;s also useless unless your visitors can find it easily and enjoy viewing it.</p>

<p>Rule of Thumb:  &#8220;Fancy&#8221; is nice, but &#8220;effective&#8221; is better.</p>

<h2>Conclusion</h2>

<p>With the abundance of tools available today to create an online presence, it&#8217;s tempting to rush through development in order to get &#34;online&#34; as soon as possible.  This often results in sites that are not only poorly executed, but actually harmful to the reputation of the company.</p>


<p>Careful planning of your site and its content, and a clear understanding of your target audience, are the keys to a successful online venture.</p>

<p>Well, that, and having something people <em>want</em>.</p>]]></description>
		<wfw:commentRss>http://darrinb.com/notes/2008/common-issues-in-new-website-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

