<?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>farfromfearless &#187; How To</title>
	<atom:link href="http://www.farfromfearless.com/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.farfromfearless.com</link>
	<description>Personal blog of Chris Murphy</description>
	<lastBuildDate>Wed, 14 Jul 2010 13:18:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>WordPress Theme Design Part 4: Visual Texture</title>
		<link>http://www.farfromfearless.com/2009/02/25/wordpress-theme-design-part-4-visual-texture/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wordpress-theme-design-part-4-visual-texture</link>
		<comments>http://www.farfromfearless.com/2009/02/25/wordpress-theme-design-part-4-visual-texture/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 22:08:43 +0000</pubDate>
		<dc:creator>Chris Murphy</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[Grunge]]></category>
		<category><![CDATA[Industrial]]></category>
		<category><![CDATA[Textiles]]></category>
		<category><![CDATA[Textures]]></category>
		<category><![CDATA[Theme Design]]></category>
		<category><![CDATA[Watercolor]]></category>

		<guid isPermaLink="false">http://www.farfromfearless.com/?p=237</guid>
		<description><![CDATA[It’s been some time since my last posting on my “WordPress Theme Design” series (a year and change), and so I thought it was well past time that I got on with the series. In previous installments, I’ve covered topics such as layout, typography, and color &#038; contrast. This time around, I’ll be covering “texture”.]]></description>
			<content:encoded><![CDATA[<p>Visual texture plays a large role in design: the lack of and the addition of texture are all part of visual communication. It is one of the ways a designer can appeal to the users’ senses through a medium that is not tactile by nature.</p>
<p>Strategic use of texture can help to shape the perception of a design; it can turn a simple website layout into something evocative; when delivered in context with the subject matter of the site (articles, information, etc), texture can help to communicate tone and attitude.</p>
<h3>Texture In Web Design</h3>
<p>Visual textures can be lumped into three relative categories:</p>
<ol>
<li>Patterns</li>
<li>Photographic</li>
<li>Illustrated</li>
</ol>
<h4>Patterns as Texture</h4>
<p>Patterns are the most common type of texture that you encounter on the web. In many cases they are tileable images that are rendered as background images in a page, or appear as textured design accents. Patterns can range from illustrated elements that can repeat endlessly, or as three dimensional (often photographic) textures that can evoke a sense of depth and dimension.</p>
<p><strong>Example:</strong></p>
<p><a href="http://www.farfromfearless.com/wp-content/uploads/2009/02/patterns.png"><img style="display: inline" title="patterns" src="http://www.farfromfearless.com/wp-content/uploads/2009/02/patterns-thumb.png" alt="patterns" width="414" height="138" /></a></p>
<p><strong>Fig. 1</strong> – Tileable Patterns.</p>
<p><strong>Resources:</strong></p>
<ul>
<li><a title="K10K Pixel Patterns" href="http://www.k10k.net/sections/pixelpatterns/">K10K Pixel Patterns</a></li>
<li><a title="SquidFingers Patterns" href="http://www.squidfingers.com/patterns/">SquidFingers Patterns</a></li>
<li><a title="BgPatterns.com Patterns" href="http://bgpatterns.com/">BgPatterns</a></li>
</ul>
<h4>Photographs as Texture</h4>
<p>It would be more appropriate to consider photographic texture as singular instances of texture applied to the design, rather than something that is explicitly tiled as in the case of patterns. Photographic textures tend to range in subject matter, but the most common example of photographic texture are images that can be used as backgrounds, such as walls (brick, cement, etc).</p>
<p><strong>Example:</strong></p>
<p><a href="http://www.farfromfearless.com/wp-content/uploads/2009/02/b19light-fx111.jpg"><img style="display: inline" title="b19light_fx111" src="http://www.farfromfearless.com/wp-content/uploads/2009/02/b19light-fx111-thumb.jpg" alt="b19light_fx111" width="176" height="132" /></a> <a href="http://www.farfromfearless.com/wp-content/uploads/2009/02/b17dario284.jpg"><img style="display: inline" title="b17dario284" src="http://www.farfromfearless.com/wp-content/uploads/2009/02/b17dario284-thumb.jpg" alt="b17dario284" width="176" height="132" /></a> <a href="http://www.farfromfearless.com/wp-content/uploads/2009/02/47d966867f354grungetexture.png"><img style="display: inline" title="47d966867f354,Grunge-Texture" src="http://www.farfromfearless.com/wp-content/uploads/2009/02/47d966867f354grungetexture-thumb.png" alt="47d966867f354,Grunge-Texture" width="176" height="132" /></a></p>
<p><strong>Fig. 2-4 – </strong>Light, textiles and other industrial textures.</p>
<p><strong>Resources:</strong></p>
<ul>
<li><a title="ImageAfter - The Raw Base for Your Creativity" href="http://www.imageafter.com/">ImageAfter</a></li>
<li><a title="iStockPhoto: Search Royalty Free Images &amp; Photos" href="http://www.istockphoto.com/index.php">iStockPhoto</a></li>
</ul>
<h4>Illustration as Texture</h4>
<p>Illustrated texture is something of a trend over the past few years, where artists and designers mix various sources such as photographs, tileable patterns, and light to create unique textures.</p>
<p><strong>Examples:</strong></p>
<p><a href="http://www.farfromfearless.com/wp-content/uploads/2009/02/ist2-2429487greenstreakwatercolorbackground.jpg"><img style="display: inline" title="ist2_2429487-green-streak-watercolor-background" src="http://www.farfromfearless.com/wp-content/uploads/2009/02/ist2-2429487greenstreakwatercolorbackground-thumb.jpg" alt="ist2_2429487-green-streak-watercolor-background" width="176" height="139" /></a> <a href="http://www.farfromfearless.com/wp-content/uploads/2009/02/ist2-1744256bluewatercolorwash2.jpg"><img style="display: inline" title="ist2_1744256-blue-watercolor-wash-2" src="http://www.farfromfearless.com/wp-content/uploads/2009/02/ist2-1744256bluewatercolorwash2-thumb.jpg" alt="ist2_1744256-blue-watercolor-wash-2" width="176" height="106" /></a> <a href="http://www.farfromfearless.com/wp-content/uploads/2009/02/ist2-1977280yellowandorangewatercolorbackground.jpg"><img style="display: inline" title="ist2_1977280-yellow-and-orange-watercolor-background" src="http://www.farfromfearless.com/wp-content/uploads/2009/02/ist2-1977280yellowandorangewatercolorbackground-thumb.jpg" alt="ist2_1977280-yellow-and-orange-watercolor-background" width="176" height="128" /></a></p>
<p><strong>Fig. 5-7</strong> – Mixed water color backgrounds.</p>
<p><strong>Resources:</strong></p>
<ul>
<li><a title="iStockPhoto: Search Royalty Free Images &amp; Photos" href="http://www.istockphoto.com/index.php">iStockPhoto</a></li>
<li><a title="Free Photoshop Brushes at Brusheezy!" href="http://www.brusheezy.com/">Brusheezy</a></li>
</ul>
<h3>Texture in WordPress Themes</h3>
<p>Texture as a design element contributes to the overall personality of the design. When it comes to WordPress Themes, authors tend to exhibit a need to communicate an aspect of their personality through the theme they choose to employ on their blog.</p>
<p>If you’re thinking about using texture as part of your design, consider the following:</p>
<ol>
<li><strong>Theme:</strong> What is the <em>theme</em> of your theme?</li>
<li><strong>Prominence:</strong> How prominent are the textures going to be in your design?</li>
<li><strong>Repetition:</strong> How often and how many repeatable textures are you planning to use in the design?</li>
</ol>
<h3>Bringing it Together</h3>
<p>Designing a successful WordPress theme is no different from designing a compelling website layout – both need to illustrate an artistic (and practical) balance of many design concept where texture may be one fundamental aspect of that balance.</p>
<p>When you’re considering the design of your WordPress theme, think about how your chosen texture(s) will work together with your other design elements to communicate the overall theme.</p>
<p>For example, if you’re out to create a theme that needs to communicate and “outdoors lifestyle” or “nature”, you may want to consider using textures that are organic. In a case like this could could mix various types of textures (tileable, photographic and illustrated).</p>
<p><a href="http://www.farfromfearless.com/wp-content/uploads/2009/02/outdooritaliaofficialsite.png"><img style="display: inline" title="Outdoor Italia official site" src="http://www.farfromfearless.com/wp-content/uploads/2009/02/outdooritaliaofficialsite-thumb.png" alt="Outdoor Italia official site" width="540" height="369" /></a></p>
<p><strong>Fig. 8</strong> – <a title="Outdoor Italia" href="http://www.outdooritalia.it/">Outdoor Italia</a></p>
<p>The Outdoor Italia site is a great example of how various types of tileable and photographic texture can be used in a design to communicate a theme. The site makes great use of photographic textures in the form of leaves, paper, and the occasional physical item to deliver a sense of depth.</p>
<p><a href="http://www.farfromfearless.com/wp-content/uploads/2009/02/wildaboutgardening.png"><img style="display: inline" title="Wild About Gardening" src="http://www.farfromfearless.com/wp-content/uploads/2009/02/wildaboutgardening-thumb.png" alt="Wild About Gardening" width="540" height="441" /></a></p>
<p><strong>Fig. 9</strong> – <a title="Canadian Wildlife Federation - Wild About Gardening" href="http://www.wildaboutgardening.org/">Wild About Gardening</a></p>
<p>The Wild About Gardening is one of my favourite sites for two reasons: the illustration work makes subtle use of &#8212; and reference to &#8212; watercolor art, and it blends well with photographic texture. This site is a great example of Photographic and Illustrated texture working naturally together to communicate a sense of unity in the design.</p>
<p>The above examples aren’t WordPress themes, but the leap from content to editorial layout isn’t difficult to make.</p>
<p>Remember that not every WordPress design you create has to have shiny buttons and glossy blocks. Take time to experiment with texture in your design, and discover how different textures can dramatically change the tone and style of your design.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.farfromfearless.com/2009/02/25/wordpress-theme-design-part-4-visual-texture/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>How To Style Your Most Recent WordPress Posting</title>
		<link>http://www.farfromfearless.com/2008/09/06/how-to-style-your-most-recent-wordpress-posting/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-style-your-most-recent-wordpress-posting</link>
		<comments>http://www.farfromfearless.com/2008/09/06/how-to-style-your-most-recent-wordpress-posting/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 02:52:55 +0000</pubDate>
		<dc:creator>Chris Murphy</dc:creator>
				<category><![CDATA[Developement]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Techniques]]></category>
		<category><![CDATA[WordPress Posts]]></category>
		<category><![CDATA[WordPress Theme Design]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.farfromfearless.com/?p=167</guid>
		<description><![CDATA[One question that I'm asked most often is: "how do I get my most recent post to look different than my older posts?", and second to that is, "how do I show alternate colors in my posts?"]]></description>
			<content:encoded><![CDATA[<p>How you choose to style your blog postings is largely dependent on the theme you&#8217;ve selected to use on your blog, your writing style, as well as &#8212; perhaps &#8212; your skill at modifying the themes.</p>
<p>For the most part, you may be stuck with using the setup that the Theme Designer decided to adopt.</p>
<p>Blogs typically take one of three common approaches to displaying posts:</p>
<ol>
<li>Posts are displayed as excerpts with a &#8220;read more&#8221; link.</li>
<li>Posts are displayed with the full body of the posting.</li>
<li>Only one post is displayed with pagination available.</li>
</ol>
<p>The first approach &#8212; the most common of the three &#8212; is likely a result of the Theme Designer choosing to use the out-of-the-box functionality of the blogging software (and to be fair, it is likely the most efficient); however, not everyone wants a cookie cutter solution to displaying their posts.</p>
<p>The reality is such that you don&#8217;t actually need to do a lot of work to get your blog postings to appear the way you want them to. I can&#8217;t speak for other blogging software packages, but when it comes to WordPress, there are a many techniques you can apply to customize your postings.</p>
<h2>WordPress &#8211; The Loop</h2>
<p>The meat-and-potatoes of WordPress is &#8220;<a title="WordPress - The Loop" href="http://codex.wordpress.org/The_Loop">The Loop</a>&#8220;. If you&#8217;ve ever attempted to customize a WordPress theme, it&#8217;s likely you&#8217;ve encountered this The Loop (essentially a &#8220;while&#8221; loop). This is an example of a very simple loop (taken from the WordPress codex):</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   1:</span> <span style="color: #0000ff;">if</span> (have_posts()) :</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   2:</span>    <span style="color: #0000ff;">while</span> (have_posts()) :</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   3:</span>       the_post();</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   4:</span>       the_content();</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   5:</span>    endwhile;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   6:</span> endif;</pre>
</div>
</div>
<p>This is a better explanation if you&#8217;re not too familiar with code:</p>
<blockquote><p><strong>The Loop</strong> is used by WordPress to display each of your posts. Using The Loop, WordPress processes each of the posts to be displayed on the current page and formats them according to how they match specified criteria within The Loop tags.</p></blockquote>
<p>If you examine one of the template files of your theme you may encounter a more complicated version of the above snippet.  The Loop is where we are going to start to customize the appearance of your postings.</p>
<h2>Postings</h2>
<p>A post in WordPress is comprised of a number of elements such as the Title of the post, the Content of the post, and assorted information like the Date/Time, etc. In the common approaches, all of the postings share the exact same format and display identical information.</p>
<p>Boring.</p>
<p>But it doesn&#8217;t have to be this way. The developers of WordPress were smart enough to realize that while the majority of theme designers don&#8217;t mind this type of homogenous approach, there are a few Theme Designers out there who prefer not to follow this pattern. As such, WordPress is built with with the ability to modify how The Loop is applied.</p>
<p>There are several approaches to modifying The Loop, but the two that I prefer are:</p>
<ol>
<li>Use <a title="WordPress - query_posts(...)" href="http://codex.wordpress.org/Template_Tags/query_posts">query_posts</a> with counter and offset.</li>
<li>Use The Loop with counter and conditions.</li>
</ol>
<h2>The Loop With query_posts(&#8230;)</h2>
<p>It took me a while to understand what this feature did; quite simply put, it adds additional parameters in the The Loop to instruct WordPress on what to output.</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   1:</span> &lt;?php query_posts(<span style="color: #006080;">'showposts=1'</span>); ?&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   2:</span> &lt;?php <span style="color: #0000ff;">if</span> (have_posts()) : <span style="color: #0000ff;">while</span> (have_posts()) : the_post(); ?&gt;</pre>
</div>
</div>
<p>The snippet above was taken from <a title="Lemon Twist v2.0 Updated WordPress Theme" href="http://www.farfromfearless.com/2008/01/11/lemon-twist-v20-updated-wordpress-theme/">one of my WordPress themes</a>. In the theme, I use the above approach to display ONLY my most recent posting in full. Here&#8217;s a simplified version of the markup I use:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   1:</span> &lt;!-- set main-entry --&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   2:</span> &lt;?php query_posts(<span style="color: #006080;">'showposts=1'</span>); ?&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   3:</span> &lt;?php <span style="color: #0000ff;">if</span> (have_posts()) : <span style="color: #0000ff;">while</span> (have_posts()) : the_post(); ?&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   4:</span> &lt;div <span style="color: #0000ff;">class</span>=<span style="color: #006080;">"main-entry"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   5:</span>     &lt;h2&gt;&lt;a href=<span style="color: #006080;">"&lt;?php the_permalink(); ?&gt;"</span> rel=<span style="color: #006080;">"bookmark"</span> title=<span style="color: #006080;">"Permanent Link to &lt;?php the_title(); ?&gt;"</span>&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   6:</span>     &lt;?php <span style="color: #008000;">//the post meta ?&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   7:</span>     &lt;ul <span style="color: #0000ff;">class</span>=<span style="color: #006080;">"meta-top"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   8:</span>         &lt;li&gt;&lt;strong&gt;Posted:&lt;/strong&gt; &lt;?php the_time(<span style="color: #006080;">'F j, Y'</span>); ?&gt;&lt;/li&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   9:</span>         &lt;li&gt;&lt;strong&gt;Author:&lt;/strong&gt;  &lt;?php the_author(); ?&gt;&lt;/li&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  10:</span>         &lt;li&gt;&lt;strong&gt;Filed under:&lt;/strong&gt; &lt;?php the_category(<span style="color: #006080;">','</span>); ?&gt;&lt;/li&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  11:</span>         &lt;li&gt;&lt;?php <span style="color: #0000ff;">if</span>( get_the_tags() != NULL ) { the_tags(<span style="color: #006080;">'&lt;strong&gt;Tags:&lt;/strong&gt; '</span>,<span style="color: #006080;">', '</span>); }<span style="color: #0000ff;">else</span>{ echo <span style="color: #006080;">"&lt;strong&gt;Tags:&lt;/strong&gt; No tags set for this entry."</span>; }?&gt;&lt;/li&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  12:</span>     &lt;/ul&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  13:</span>     &lt;?php</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  14:</span>         the_content(<span style="color: #006080;">'Read more...'</span>);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  15:</span>     ?&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  16:</span> &lt;/div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  17:</span> &lt;?php endwhile; endif; ?&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  18:</span> &lt;!-- end main-entry --&gt;</pre>
</div>
</div>
<p>In this example, The Loop is executed only once and only once. The query_posts() function passes instructions to The Loop to show only one post (using query_posts(<strong>&#8216;showposts=1&#8242;</strong>)). While The Loop is executed, it will output all of the post&#8217;s information that I&#8217;ve specified using the appropriate Post tags.</p>
<p><strong>NOTE: </strong>I have set the container &lt;div&gt; class to &#8220;main-entry&#8221;. This references a rule in my CSS file that will style the output accordingly.</p>
<p>Unfortunately, you&#8217;re stuck with only one posting on your page. We need to display older postings as well, and ideally in a format that is different than the most recent.</p>
<p>As previously mentioned, The Loop was executed only once with the example above. This is a powerful feature of query_posts(), in that you have a tremendous amount of control over The Loop &#8212; in this case, how many times it is executed.</p>
<p>To render the older postings, you can do this:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   1:</span> &lt;!-- set past-entry --&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   2:</span> &lt;?php query_posts(<span style="color: #006080;">'showposts=9&amp;offset=1'</span>); ?&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   3:</span> &lt;?php <span style="color: #0000ff;">if</span> (have_posts()) : <span style="color: #0000ff;">while</span> (have_posts()) : the_post(); ?&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   4:</span> &lt;div <span style="color: #0000ff;">class</span>=<span style="color: #006080;">"past-entry"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   5:</span>     &lt;ul <span style="color: #0000ff;">class</span>=<span style="color: #006080;">"dateblock left"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   6:</span>         &lt;li <span style="color: #0000ff;">class</span>=<span style="color: #006080;">"top"</span>&gt;&lt;?php the_time(<span style="color: #006080;">'M Y'</span>); ?&gt;&lt;/li&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   7:</span>         &lt;li <span style="color: #0000ff;">class</span>=<span style="color: #006080;">"bottom"</span>&gt;&lt;?php the_time(<span style="color: #006080;">'j'</span>); ?&gt;&lt;/li&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   8:</span>     &lt;/ul&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   9:</span>     &lt;div <span style="color: #0000ff;">class</span>=<span style="color: #006080;">"entry-content"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  10:</span>         &lt;h1&gt;&lt;a href=<span style="color: #006080;">"&lt;?php the_permalink() ?&gt;"</span> rel=<span style="color: #006080;">"bookmark"</span> title=<span style="color: #006080;">"Permanent Link to &lt;?php the_title(); ?&gt;"</span>&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  11:</span>         &lt;?php</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  12:</span>             the_excerpt();</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  13:</span>         ?&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  14:</span>     &lt;/div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  15:</span> &lt;/div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  16:</span> &lt;?php endwhile; endif; ?&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  17:</span> &lt;!-- end past-entry --&gt;</pre>
</div>
</div>
<p>Aside from the simpler markup, the core difference between this second snippet and the first are the instructions/parameters in query_posts(), and the CSS class which is referenced.</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   1:</span> &lt;?php query_posts(<span style="color: #006080;">'showposts=9&amp;offset=1'</span>); ?&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   2:</span> &lt;?php <span style="color: #0000ff;">if</span> (have_posts()) : <span style="color: #0000ff;">while</span> (have_posts()) : the_post(); ?&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   3:</span> &lt;div <span style="color: #0000ff;">class</span>=<span style="color: #006080;">"past-entry"</span>&gt;</pre>
</div>
</div>
<p>If you combine both of the examples above, what you&#8217;ll find is that you&#8217;re actually running The Loop twice &#8212; in the first instance, The Loop only outputs the most recent post. In the second instance, it skips over the most recent  post completely, and outputs as many older posts as you defined in query_posts().</p>
<p><strong>NOTE:</strong> if you examine the parameters in the second query_posts() instance, you should see &#8220;<strong>showposts=9&amp;offset=1</strong>&#8221; &#8212; this will output <strong>10</strong> posts in total on your page, where <strong>9</strong> such posts are older.</p>
<h3>Styling The Posts</h3>
<p>What you need now are two CSS rules which define:</p>
<ol>
<li>&#8220;main-entry&#8221;</li>
<li>&#8220;past-entry&#8221;</li>
</ol>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   1:</span> <span style="color: #008000;">/* CSS Snippet */</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   2:</span> #post-container div.main-entry {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   3:</span>     background-color: #CCCCCC;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   4:</span>     color: #000000;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   5:</span>     font-size: 1em;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   6:</span> }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   7:</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   8:</span> #post-container div.past-entry {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   9:</span>     background-color: #ffffff;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  10:</span>     color:#333333;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  11:</span>     font-size: .92em;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  12:</span> }</pre>
</div>
</div>
<p>The XHTML markup does not have to be different between these posts, and as you can see in the CSS snippet above, you can get away with as little as displaying a different background color, font color or a larger font size.</p>
<h3>The Caveat</h3>
<p>Yes, there is a downside to using query_posts(). Programmatically speaking, you should try to optimize the number of queries you execute against your database. Since WordPress is largely database driven, you can expect a high volume of requests on any given page. Using query_posts() should be done sparingly (I limit it&#8217;s use to the homepage of my blog).</p>
<p>Also, if you are wanting to support pagination, you will need to do a little more work to setup the query properly &#8212; you can <a title="WordPress - query_posts()" href="http://codex.wordpress.org/Template_Tags/query_posts">read more about it here</a>.</p>
<h2>The Loop With Counter &amp; Conditions</h2>
<p>The simplest method to determine and style your most recent post in contrast to your older postings is a pure implementation of &#8220;The Loop&#8221;. This implementation also relies on using a counter to keep track of how many posts you&#8217;re outputting (as determined by your WordPress settings), as well as a condition to determine which class to reference when styling the output.</p>
<p>Here is an example of this in action:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   1:</span> &lt;?php</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   2:</span>     <span style="color: #0000ff;">if</span> (have_posts()) {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   3:</span>         <span style="color: #008000;">// the counter (initialized to 0 );</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   4:</span>         $n = 0;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   5:</span>         <span style="color: #008000;">// the while loop</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   6:</span>         <span style="color: #0000ff;">while</span> (have_posts()) {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   7:</span>             <span style="color: #008000;">// the CSS class to apply</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   8:</span>             $<span style="color: #0000ff;">class</span> = ( $n == 0 ) ? <span style="color: #006080;">"main-entry"</span> : <span style="color: #006080;">"past-entry"</span>;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">   9:</span> ?&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  10:</span>             &lt;!-- set post --&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  11:</span>             &lt;div <span style="color: #0000ff;">class</span>=<span style="color: #006080;">"&lt;?php echo $class; ?&gt;"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  12:</span>                 &lt;ul <span style="color: #0000ff;">class</span>=<span style="color: #006080;">"dateblock"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  13:</span>                     &lt;li <span style="color: #0000ff;">class</span>=<span style="color: #006080;">"top"</span>&gt;&lt;?php the_time(<span style="color: #006080;">'M Y'</span>); ?&gt;&lt;/li&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  14:</span>                     &lt;li <span style="color: #0000ff;">class</span>=<span style="color: #006080;">"bottom"</span>&gt;&lt;?php the_time(<span style="color: #006080;">'j'</span>); ?&gt;&lt;/li&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  15:</span>                 &lt;/ul&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  16:</span>                 &lt;div <span style="color: #0000ff;">class</span>=<span style="color: #006080;">"entry-content"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  17:</span>                     &lt;h1&gt;&lt;a href=<span style="color: #006080;">"&lt;?php the_permalink() ?&gt;"</span> rel=<span style="color: #006080;">"bookmark"</span> title=<span style="color: #006080;">"Permanent Link to &lt;?php the_title(); ?&gt;"</span>&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  18:</span>                     &lt;?php</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  19:</span>                         <span style="color: #0000ff;">if</span>( $n == 0 ) {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  20:</span>                             the_content();</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  21:</span>                         }<span style="color: #0000ff;">else</span> {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  22:</span>                             the_excerpt();</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  23:</span>                         }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  24:</span>                     ?&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  25:</span>                 &lt;/div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  26:</span>             &lt;/div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  27:</span>             &lt;!-- set post --&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  28:</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  29:</span> &lt;?php</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  30:</span>             <span style="color: #008000;">// incriment the counter</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  31:</span>             $n .= 1;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  32:</span>         }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  33:</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  34:</span>     }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060;">  35:</span> ?&gt;</pre>
</div>
</div>
<p>As you can see from the example above, we&#8217;ve taken a basic instance of The Loop and added in two variables:</p>
<ol>
<li><strong>$n</strong> &#8212; this is the counter used to determine which which is the most recent (starting at &#8220;0&#8243; &#8212; the first).</li>
<li><strong>$class</strong> &#8212; this is the CSS class that we want to reference (&#8220;main-entry&#8221; or &#8220;past-entry&#8221;).</li>
</ol>
<p>The method and approach to styling the post is the same as the examples in query_posts(). The XHTML markup can be re-used between new and older postings, but this is not required. With a little work you can supply The Loop with two different sets of markup to render.</p>
<h3>The Caveat</h3>
<p>While this implementation is rather straight forward, it can get complicated quickly if you want to include more and more variations between postings. Each variation requires a little more forethought, and the appropriate conditions to determine what to do and what to render. What you may end up with is a lot of messy markup that is difficult to read.</p>
<h2>Conclusion</h2>
<p>It doesn&#8217;t take a lot of work to modify your WordPress template to render your most recent posting in a unique fashion. In some cases, you can download plugins to help you style your postings; for me, having to rely on additional plugins seems more overhead than is necessary. The techniques outlined in this article are only two of many such approaches (and certainly a manual approach).</p>
<p>Don&#8217;t feel as if you have to select one over the other. In fact, your writing style and your choice of template play a large part in determining which method is most appropriate.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.farfromfearless.com/2008/09/06/how-to-style-your-most-recent-wordpress-posting/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>How To Quote Comments In A WordPress Comment List</title>
		<link>http://www.farfromfearless.com/2008/08/29/how-to-quote-comments-in-wordpress-comment-list/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-quote-comments-in-wordpress-comment-list</link>
		<comments>http://www.farfromfearless.com/2008/08/29/how-to-quote-comments-in-wordpress-comment-list/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 21:17:31 +0000</pubDate>
		<dc:creator>Chris Murphy</dc:creator>
				<category><![CDATA[Developement]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Quotes]]></category>
		<category><![CDATA[WordPress Commenting]]></category>
		<category><![CDATA[WordPress Comments]]></category>

		<guid isPermaLink="false">http://www.farfromfearless.com/?p=161</guid>
		<description><![CDATA[Sometimes it's the little details that make WordPress themes really shine, other times it's the little features you can add that make working with a WordPress theme a nice experience for readers.]]></description>
			<content:encoded><![CDATA[<p>I received an email from a reader this afternoon, asking about one of the commenting features that I built into the <a title="Download Lemon Twist 2.0.x" href="http://www.farfromfearless.com/2008/01/11/lemon-twist-v20-updated-wordpress-theme/">Lemon Twist</a> theme: quote comments.</p>
<blockquote><p>Hi Chris,</p>
<p>I’m really curious on how you got that quote feature on your comment section. Do you mind sharing your code?</p>
<p>Cheers,<br />
[<span style="text-decoration: line-through;">author name omitted</span>]</p></blockquote>
<p>While this is not a new feature by and large, it is one that I thought would bring a sense of discussion to the linear WordPress comment format much like how forums work. I&#8217;ve attempted to use threaded commenting plugins, but they are ugly and overly complicated for something that should be fairly straight forward.</p>
<p>In any case, this is the JavaScript snippet that I wrote (you need <a title="jQuery" href="http://jquery.com/">jQuery</a>, but comes with the theme)</p>
<pre>// attach a function to the quote comment link
  $('a.quote-comment').click( function() {
      var tb = $('#comment');
      var strQuote = $(this).attr('title');
      // assign the value
      tb.val('&lt;blockquote&gt;' + strQuote + '&lt;/blockquote&gt;');
      return false;
   });</pre>
<p>This is the result:</p>
<p><a href="http://www.farfromfearless.com/wp-content/uploads/HowtoQuoteCommentsinWordPressCommentList_ECB9/quote.jpg"><img src="http://www.farfromfearless.com/wp-content/uploads/HowtoQuoteCommentsinWordPressCommentList_ECB9/quote_thumb.jpg" alt="quote" width="540" height="173" /></a></p>
<p>There are a couple caveats to this feature</p>
<ol>
<li>You can only quote one comment at a time, as I didn&#8217;t build in concatenation.</li>
<li>It is not parameterized so you&#8217;ll have to customize it for your own theme.</li>
<li>Requires some additional styling (no big deal).</li>
</ol>
<p>If anyone wants to improve on this, feel free to share!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.farfromfearless.com/2008/08/29/how-to-quote-comments-in-wordpress-comment-list/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
