<?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>Nathan Rice &#187; WordPress Tips</title>
	<atom:link href="http://www.nathanrice.net/category/blog/wordpress-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nathanrice.net</link>
	<description>Web Design, WordPress Themes, and Blogging</description>
	<lastBuildDate>Thu, 22 Oct 2009 20:33:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Definitive Sticky Posts Guide for WordPress 2.7</title>
		<link>http://www.nathanrice.net/blog/definitive-sticky-posts-guide-for-wordpress-27/</link>
		<comments>http://www.nathanrice.net/blog/definitive-sticky-posts-guide-for-wordpress-27/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 12:00:32 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Planet WordPress]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[is_sticky]]></category>
		<category><![CDATA[post_class]]></category>
		<category><![CDATA[sticky post styling]]></category>
		<category><![CDATA[sticky posts]]></category>
		<category><![CDATA[wordpress 2.7]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/?p=201</guid>
		<description><![CDATA[WordPress 2.7 sticky posts are more complex than we thought. This post simplifies it.]]></description>
			<content:encoded><![CDATA[<p>As the blogosphere is abuzz about all the cool new features in WordPress 2.7, I&#8217;ve seen very few (if any) good posts on the new <a href="http://codex.wordpress.org/Version_2.7#Sticky_Posts">Sticky Posts feature</a> that will allow you to take any story, or stories, you&#8217;ve published and place them at the top of your homepage without editing the timestamp.  <strong>This new feature will allow you to take posts that you&#8217;re especially proud of and display them for all the world to see for as long as you want</strong>.</p>
<p>But for many theme and plugin developers, and even users who may want to do a little DIY theme hacking, there is very little documentation for getting the feature set up to do the things you want it to.  That&#8217;s where this guide comes in.<span id="more-201"></span></p>
<h2>Turing a Post into a Sticky Post</h2>
<p><img class="alignnone size-full wp-image-202" style="float:right; margin: 0 0 5px 5px;" title="picture-1" src="http://www.nathanrice.net/wp-content/uploads/2008/11/picture-1.png" alt="picture-1" width="289" height="207" />In the 2.7 Post edit panel, over in the <a href="http://www.nathanrice.net/blog/mark-jaquith-explains-the-27-publish-module/">publish module</a>, you&#8217;ll notice a little checkbox.  When you check this box and publish the post (or save an already published post), that post will then be pulled to the top of your homepage.</p>
<p>Also, it is worth noting that a post can be made &#8220;sticky&#8221; using the &#8220;Quick Edit&#8221; panel as well.  In WordPress 2.7, simple click the Posts -&gt; Edit link, then click the &#8220;Quick Edit&#8221; link.</p>
<p>This will bring up a panel that lets you edit common features of a post like its categories, tags, title, slug, date, author, etc.  But it also allows you to change whether or not a post is a sticky post.</p>
<p><a class="thickbox" href="http://www.nathanrice.net/wp-content/uploads/2008/11/picture-2.png"><img class="alignnone size-full wp-image-203" title="picture-2" src="http://www.nathanrice.net/wp-content/uploads/2008/11/picture-2.png" alt="picture-2" width="492" height="115" /></a></p>
<p><strong>This is especially handy when you need to &#8220;unsticky&#8221; a post in order to let another post take it&#8217;s place at the top of the homepage</strong>.  Imagine how tedious it would be to have to pull up the full Edit Post panel just to &#8220;unsticky&#8221; a post.  It would get very annoying, so I&#8217;m glad to see the developers opted to include this option in the Quick Edit panel as well.</p>
<h2>Styling a Sticky Post</h2>
<p><strong>If you&#8217;re like me, you probably want to have a way to let your readers know that, although the post is at the top of your homepage, it may not necessarily be the latest post you&#8217;ve published.</strong> Luckily, WordPress 2.7 introduces the new <code>post_class()</code> template tag that will give a class of &#8220;sticky&#8221; to any post that has been made into a sticky post.  Here&#8217;s how you would use it.</p>
<p><em>(By the way, it would be worth your while to take a look at the <a href="http://codex.wordpress.org/Template_Tags/post_class">Codex page for post_class</a> when it becomes available. The function can really give you some cool flexibility in how different posts are styled. I suppose that&#8217;s another post for another day.)</em></p>
<p>If you&#8217;re familiar with the loop, you&#8217;ll probably recognize the following code (or some variation of it):</p>
<pre>&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
&lt;h3&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;?php the_content(); ?&gt;
&lt;?php endwhile; endif; ?&gt;</pre>
<p>In order to use the new <code>post_class()</code> template tag, just be sure to wrap the content of each post that the loop outputs in a new div.  The code would looks something like this:</p>
<pre>&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
&lt;div &lt;?php post_class(); ?&gt;&gt;
&lt;h3&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;?php the_content(); ?&gt;
&lt;/div&gt;
&lt;?php endwhile; endif; ?&gt;</pre>
<p>Depending on what type of post it is, it will output different kinds of stuff.  For instance, if you view the source code for my homepage, you&#8217;ll see my posts wrapped in these divs already.  For the post <a href="http://www.nathanrice.net/blog/community-self-respect-and-free-wordpress-themes/">Community, Self-Respect, and Free WordPress Themes</a>, the div class generator created this:</p>
<pre>&lt;div class="post hentry category-blog category-general category-planet-wordpress category-wordpress-news tag-elevate-themes tag-free-wordpress-theme tag-free-wordpress-themes tag-wordpress"&gt;</pre>
<p>Now, if that post had been marked &#8220;sticky&#8221;, then you would have seen the word &#8220;sticky&#8221; show up in that list too.  You can use any of those classes to style a post differently, but in this case, we&#8217;re just looking to differentiate the sticky posts. By adding a new class declaration in our <code>CSS</code> file, we can make a sticky post look any way we want:</p>
<pre>.sticky {
    background: white;
    border: 2px solid black;
}</pre>
<p>The possibilities are really endless &#8212; it&#8217;s all up to you!</p>
<h2>Sticky Styling in Other Templates</h2>
<p>As far as I know, the sticky feature does not actually affect any other templates besides the homepage post listing.  The only possible exception would be the search results (see the <a href="http://trac.wordpress.org/ticket/7457">Trac ticket</a> for more information).</p>
<p>However, there is one caveat as pointed out by <a href="http://wpengineer.com/strange-things-with-sticky-posts/">Michael at WPEngineer.com</a> &#8212; sticky posts don&#8217;t simply get &#8220;pulled to the front of the line&#8221;.  In fact, <strong>if you&#8217;re browsing through someone&#8217;s archives, and you are using the <code>post_class()</code> template tag, your sticky posts will get that sticky styling, just as though they were at the top of the homepage</strong>.</p>
<p>To remedy this, you&#8217;ll want to figure out a way to only apply that special sticky style to sticky posts that are on the homepage.  That means we&#8217;ll want to exclude things like category and date archives, page 2 of the blog homepage (<a href="http://www.nathanrice.net/page/2/">example</a>), and any other templates that you might use (tags, single posts, etc.).</p>
<p>In order to accomplish this, you&#8217;ll need to figure out a way to add a class or ID to the body tag of your theme.  <a title="Body Class and ID" href="http://www.darrenhoyt.com/2007/12/23/use-body-idclass-to-control-wordpress-page-elements/">Darren Hoyt</a> has a good post on how to do that is pretty good, but I&#8217;ll try to write up a post later that will teach you how to mimic the post_class function for your body tag.</p>
<p>So, once your body has a class or ID, just modify your <code>CSS</code> a little to reflect your desire for the sticky style to only be applied to the homepage:</p>
<pre>#home .sticky {
    background: white;
    border: 2px solid black;
}</pre>
<p>Easy enough?</p>
<h2>is_sticky() Conditional Tag</h2>
<p>Along with the ability to use the <code>post_class()</code> to identifiy sticky posts, you can also use the <code>is_sticky()</code> conditional tag to check to see if a post is sticky or not.  Here&#8217;s a practical example (to be used within the loop):</p>
<pre>&lt;?php
if (is_sticky()) echo 'This is a sticky post!';
?&gt;</pre>
<p>The <code>is_sticky()</code> conditional tag returns a Boolean value of <code>TRUE</code> or <code>FALSE</code> depending on whether or not the post is a sticky post.  Use your imagination to determine the different applications this tag can help you achieve.</p>
<h2>A Custom Loop to Return All Sticky Posts</h2>
<p>If you&#8217;re a hardcore theme developer and want to use a custom loop to return only posts that have been marked as sticky, you can use this very handy code provided by <a href="http://ottodestruct.com/blog/">Otto</a> at the <a href="http://wordpress.org/support/topic/208037?replies=5">Support forums</a>:</p>
<pre>query_posts(array('post__in'=&gt;get_option('sticky_posts')));</pre>
<p>This code goes before the loop. It qualifies the loop by telling it to only return posts that have been marked &#8220;sticky&#8221;.  You can use all the other parameters of the <code>query_posts()</code> loop qualifier as well, but that <code>post__in</code> part is the part that actually tells the loop to only return the sticky posts.</p>
<h2>A Custom Loop to Ignore Sticky Posts</h2>
<p>Generally speaking, sticky posts will show up at the top of ever single loop you use on your homepage.  So <strong>for complex themes that use multiple loops on the homepage to return different data, each and every one of those loops will return the same sticky post(s)</strong>.  And it seems like even loop qualifiers like the <code>query_posts()</code> argument <code>post__not_in</code> don&#8217;t work on excluding posts.  No matter what you do, those sticky posts will be at the top of all your loops.</p>
<p>Thankfully, once again <a href="http://ottodestruct.com/blog/">Otto</a> comes to the rescue with some more handy code.</p>
<p>If you want your loop to ignore the sticky status of posts, just use this code before the loop:</p>
<pre>query_posts('caller_get_posts=1');</pre>
<p>Again, this parameter can be used with any of the other arguments for <code>query_posts()</code>.  <strong>And this code doesn&#8217;t simply exclude posts marked sticky &#8230; it actually ignores the sticky status altogether</strong>.  So if a person marks a post as sticky, by using this <code>query_posts()</code> parameter, you can have your loop act normally, not pulling that post to the top unless it is the latest post published (depending on the other query_posts parameters).</p>
<h2>Getting Rid of Stickies Completely</h2>
<p>Finally, if your theme doesn&#8217;t take advantage of the sticky option at all, and you just want to prohibit users from making a post sticky in the first place, you can just wipe out the field in the options table that holds all the sticky post IDs by placing this code in your theme&#8217;s functions.php file between &lt;?php ?&gt; tags: [HT: <a href="http://wpengineer.com/strange-things-with-sticky-posts/">WPEngineer.com</a>]</p>
<pre>update_option('sticky_posts', array());</pre>
<p>This empties the field and get&#8217;s rid of all sticky post IDs that the user may have saved.  This could easily save you the trouble of having to support users that insist on checking the sticky checkbox despite your warnings.  It&#8217;s just a way for you to nip the problem in the bud.</p>
<p><em>However, use it with caution.  Users don&#8217;t normally like it when you remove their data.</em></p>
<p>Well, that about wraps it up.  <strong>Everything you need to know about the Sticky Post feature in WordPress 2.7</strong>. If you have any other tips or questions, please feel free to let me know in the comments below.  I&#8217;d love to hear your thoughts about this new feature.</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-keyword-rich-permalinks/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Keyword-Rich Permalinks'>Ultimate Guide to WordPress SEO &#8211; Keyword-Rich Permalinks</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-keywords/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Keywords'>Ultimate Guide to WordPress SEO &#8211; META Keywords</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Descriptions'>Ultimate Guide to WordPress SEO &#8211; META Descriptions</a></li>
<li><a href='http://www.nathanrice.net/blog/creating-a-blog-page-with-paging/' rel='bookmark' title='Permanent Link: Creating a &#8220;Blog Page&#8221; &#8212; With Paging'>Creating a &#8220;Blog Page&#8221; &#8212; With Paging</a></li>
<li><a href='http://www.nathanrice.net/blog/wordpress-single-post-templates/' rel='bookmark' title='Permanent Link: WordPress Single Post Templates'>WordPress Single Post Templates</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/definitive-sticky-posts-guide-for-wordpress-27/feed/</wfw:commentRss>
		<slash:comments>114</slash:comments>
		</item>
		<item>
		<title>Ultimate Guide to WordPress SEO &#8211; Deep Linking</title>
		<link>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-deep-linking/</link>
		<comments>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-deep-linking/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 11:00:44 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Blogging Tips]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Planet WordPress]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[deep linking]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress search engine optimization]]></category>
		<category><![CDATA[wordpress seo]]></category>
		<category><![CDATA[wordpress theme]]></category>
		<category><![CDATA[wordpress theme seo]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/?p=169</guid>
		<description><![CDATA[You might have noticed that throughout this series on WordPress SEO, I&#8217;ve been doing something rather peculiar.  I&#8217;ve been linking to my own content far more than I&#8217;ve been linking out.  Now, this isn&#8217;t because I&#8217;m a stingy linker.  I just happen to have a goal in the methodology I&#8217;m using in this series with [...]]]></description>
			<content:encoded><![CDATA[<p>You might have noticed that throughout this series on <a title="WordPress SEO" href="http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/">WordPress SEO</a>, I&#8217;ve been doing something rather peculiar.  I&#8217;ve been linking to my own content far more than I&#8217;ve been linking out.  Now, this isn&#8217;t because I&#8217;m a stingy linker.  I just happen to have a goal in the methodology I&#8217;m using in this series with links.  That strategy is called <em>deep linking</em>, and it is one of the best ways to not only increase SEO, but also drive visitors deeper into your blog or website.</p>
<p><strong>Deep linking is the art of linking relevant keywords to related content within your own site</strong>. Essentially, you are leveraging your own site&#8217;s equity for gain.  What gain? In order to understand what is to be gained, one must first understand how links affect SEO.<span id="more-169"></span></p>
<h2>Links and SEO</h2>
<p>As I mentioned in my previous post regarding <a title="Keyword Density SEO" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-keyword-density/">keyword density</a>, SEO is so much more than just optimizing important segments of your website structure.  It has to do with calculations based on several different variables.  That doesn&#8217;t mean to ignore structural SEO, it just meanst that your job isn&#8217;t finished.</p>
<p>Included in those variables is the number of links your site, page, or post has pointing to it.</p>
<p>So, if I were to link out to a post written by my friend Ian Stewart on <a title="WordPress Child Themes" href="http://themeshaper.com/functions-php-wordpress-child-themes/">WordPress Child Themes</a>, the next time Google crawls my site, it&#8217;s going to register that link as a &#8220;vote&#8221;, for lack of a better word, for his post, and associate that post with the keywords I used in the link.  So, in essence, I just voted that his post should rank high for the keyphrase &#8220;WordPress Child Themes&#8221;.</p>
<p>Make sense?</p>
<h2>Deep Links and SEO</h2>
<p><strong>I&#8217;ll freely admit that self-referential links probably don&#8217;t count nearly as much as incoming, external links</strong>.  But they <a title="Deep Linking" href="http://www.rajdash.com/increase-your-search-engine-rankings-by-deep-linking/">do help</a>.</p>
<p>So, what do you need to do? Here&#8217;s what I do:</p>
<p>When I write a post, I don&#8217;t do any links at first.  I just write.  I find the external links that I want to use and keep them open in separate tabs.  Then, once I&#8217;m done writing and proofreading, I start filling in external links wherever I find it beneficial. <strong>Linking out is always a good practice, and doing 100% deep links could hurt you</strong>.</p>
<p>Then, I read over my post one more time, this time keeping an eye out for words or phrases that may be related to content I&#8217;ve written in the past.  For instance, if I mention the word &#8220;homepage&#8221;, I might link to the post I did called &#8220;3 Ways to Optimize Your Blog Homepage&#8221;.  Sometimes, I may even reword my sentence to get that link to fit with a more relevant (and more desirable) keyword or keyphrase.  So I may modify my sentence to include the words &#8220;homepage design&#8221; or &#8220;homepage optimization&#8221;.</p>
<p>For me, I want this series&#8217; opening post (with links to all the posts in the series) to rank well for the search term &#8220;WordPress SEO&#8221;.  This is actually pretty difficult, given that there are much older, established sites out there with many, many incoming links that I have to compete with.  So obviously, good SEO and deep linking won&#8217;t be enough to put me at the top of the list.  As it currently stands, I&#8217;m ranked at the top of the third page for that <a href="http://www.google.com/search?q=wordpress+seo">search term</a>. It won&#8217;t bring in thousands of visitors a day, but it will net me <a href="http://blog.searchenginewatch.com/blog/050314-164653">long-tail benefits</a>.</p>
<p>And for less competitive search terms like &#8220;WordPress theme search engine optimization&#8221;, I just so happen to be #2 in the search results.  That&#8217;s not bad at all, given I&#8217;ve got very few quality links back to that article.  I achieved that ranking nearly 100% through good SEO and deep linking.</p>
<h2>Don&#8217;t Overdo it</h2>
<p>When most people discover deep linking, they tend to go crazy with deep linking in posts.  Let me encourage you not to do that.</p>
<p><strong>Deep linking is great, but use it in moderation</strong>.  Here are some quick tips for deciding when to deep link:</p>
<ol>
<li>Only Deep link if the URL is relevant to the phrase. Don&#8217;t force it!</li>
<li>Keep deep links to around 5 per post. Posts that are littered with links tend to look spammy.</li>
<li>Deep link, and link out to others at an even ratio. Look for ways to link to other bloggers.</li>
<li>Remember that deep linking isn&#8217;t just for SEO. It can drive deep traffic too.</li>
<li>Keep links short. Don&#8217;t link entire sentences.</li>
</ol>
<p>Remember, this is about gaining strategic advantages, not huge leaps ahead.  Deep linking won&#8217;t work overnight, and it won&#8217;t land you on the front page for competitive keywords.  But it is just one more tool you can use to give yourself the upper hand in the SEO battle.</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/' rel='bookmark' title='Permanent Link: WordPress SEO &#8211; The Ultimate Guide to WordPress Theme Search Engine Optimization'>WordPress SEO &#8211; The Ultimate Guide to WordPress Theme Search Engine Optimization</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Descriptions'>Ultimate Guide to WordPress SEO &#8211; META Descriptions</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Optimized Titles'>Ultimate Guide to WordPress SEO &#8211; Optimized Titles</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-google-sitemaps/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Google Sitemaps'>Ultimate Guide to WordPress SEO &#8211; Google Sitemaps</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-indexing-control/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Indexing Control'>Ultimate Guide to WordPress SEO &#8211; Indexing Control</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-deep-linking/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Ultimate Guide to WordPress SEO &#8211; META Keywords</title>
		<link>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-keywords/</link>
		<comments>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-keywords/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 12:00:43 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Planet WordPress]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[meta keywords]]></category>
		<category><![CDATA[search engine optimization]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress search engine optimization]]></category>
		<category><![CDATA[wordpress seo]]></category>
		<category><![CDATA[wordpress theme]]></category>
		<category><![CDATA[wordpress theme seo]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/?p=158</guid>
		<description><![CDATA[How to use WordPress tags as META Keywords for Search Engine Optimization.]]></description>
			<content:encoded><![CDATA[<p>Up until this point in the <a title="WordPress SEO" href="http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/">WordPress SEO</a> series, I&#8217;ve been very confident in the power of the methods I&#8217;ve outlined.  I really <a title="WordPress Title Optimization" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/">don&#8217;t believe a plugin should control your TITLE</a>, I do believe you can increase search engine click-throughs by <a title="WordPress META Description" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/">using the META description tag</a>, and I do believe that <a title="WordPress Semantic Headings" href="http://www.nathanrice.net/blog/ultimage-guide-to-wordpress-seo-optimized-title-tags/">Heading structure</a> and hierarchy are important for keyword ranking.</p>
<p>But <strong>what I&#8217;m about to share today doesn&#8217;t have any solid metrics</strong>, and I&#8217;m not convinced it will help you at all.  <strong>I do personally use this method</strong> on this blog, and I haven&#8217;t noticed any negative effects on my rankings, but there are some people who <a title="Google META Keywords" href="http://www.pandia.com/sew/73-avoid-the-meta-keywords-tag.html">do believe</a> that META Keywords should never be used, given their dark history.</p>
<p>So, implement this at your own risk.  (By the way, <a href="http://www.nathanrice.net/proximity/">Proximity News Theme</a> users can turn this feature off in the theme options panel under the <em>Search Engine Optimization</em> section)<span id="more-158"></span></p>
<h2>An Introduction to META Keywords</h2>
<p>Back in the early days of the Internet and search engines, one of the ways a site&#8217;s administrator (webmaster for all you 90&#8217;s web guys) could boost his site&#8217;s rankings for certain keywords was to use the <a href="http://en.wikipedia.org/wiki/Meta_element#The_keywords_attribute">META Keywords</a> tag in the HEAD of his HTML document.  By doing this, he would be telling the search engine what kind of content was on that particular page.</p>
<p>But, some SEO guys figured out that you could game the system by stuffing keywords into the META Keywords tag that had very little, if anything, to do with the content of the website.  The result was that you could do a search for something innocent, let&#8217;s say &#8220;gold jewelery&#8221; and end up on a page that was pornographic or ad-stuffed.</p>
<p><strong>It was lazy SEO</strong>, and soon enough all the search engines wised up to it and de-prioritized the META Keyword value in ranking pages for keywords.</p>
<p><strong>There are no hard facts as to how much priority they still place on the META Keywords value, if any at all</strong>.  I&#8217;m inclined to believe that there is no penalty for using it in moderation, but the value is very low.  I do not believe any of the search engines completely ignore the value, though, which is why I happen to use it here on my blog.</p>
<h2>Keywords vs. Tags</h2>
<p>In <a title="WordPress Theme Backward Compatibility" href="http://www.nathanrice.net/blog/wordpress-23-theme-backward-compatibility/">WordPress 2.3</a>, the idea of &#8220;tagging&#8221; your content <a title="WordPress Tagging" href="http://www.nathanrice.net/blog/the-overlooked-tag-tags/">was introduced</a> into the core of WordPress.  You could now tag your content with certain keywords.  You may notice that I do this at the bottom of nearly every post I publish here at the blog.  I don&#8217;t do it because I believe it has massive value for SEO, but I do believe that it does affect your rankings, even if it is very small, especially in the blog search engines like <a href="http://technorati.com">Technorati</a>.</p>
<p><strong>In my opinion, there are no differences between tags and keywords.</strong></p>
<p>I believe that tags and keywords are fundamentally the same thing, used for the same purpose &#8212; to tell something or someone, in a few short words, what the content of the website consists of.</p>
<h2>Tags as Keywords</h2>
<p>Since I&#8217;ve decided that I&#8217;ll be using my tags for the same purpose as META Keywords, <strong>I don&#8217;t see any reason not to use my tags AS my META Keywords</strong>.</p>
<p>So what we need to do is modify our header.php file and see if we can&#8217;t manage to use the tags we use to describe our posts as META Keywords in our page source.  The only problem is, most tag &#8220;template tags&#8221; are meant to be used within <a href="http://codex.wordpress.org/The_Loop">the loop</a>.</p>
<p>That&#8217;s actually not a problem if you did <a title="WordPress META Description" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/">what I recommended in our META Description post</a>, since we already have a loop occurrence in our header.php file.  So, we&#8217;ll just piggyback on it.  The code currently looks like this:</p>
<pre>&lt;?php if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;
&lt;meta name="description" content="&lt;?php the_excerpt_rss(); ?&gt;" /&gt;
&lt;?php endwhile; endif; elseif(is_home()) : ?&gt;
&lt;/meta&gt;&lt;meta name="description" content="&lt;?php bloginfo('description'); ?&gt;" /&gt;
&lt;?php endif; ?&gt;</pre>
<p>So, what we need to do is insert our code right after the <code>&lt;meta name="description" ... /&gt;<!--formatted--></code> code, but because I like to keep heavy coding out of the template files, let&#8217;s put first put the following code into our theme&#8217;s functions.php file somewhere between PHP tags:</p>
<pre>function csv_tags() {
	$posttags = get_the_tags();
	foreach((array)$posttags as $tag) {
		$csv_tags .= $tag-&gt;name . ',';
	}
	echo '&lt;meta name="keywords" content="'.$csv_tags.'" /&gt;';
}</pre>
<p>This code takes advantage of the <a href="http://codex.wordpress.org/Template_Tags/get_the_tags">get_the_tags</a> function from WordPress which will return an array of the tags attached to the post.  I&#8217;m using a foreach loop to get the tags into a comma separated list.</p>
<p>Then just insert the function call right under the META Description:</p>
<pre>&lt;?php if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;
&lt;meta name="description" content="&lt;?php the_excerpt_rss(); ?&gt;" /&gt;
<strong>&lt;?php csv_tags(); ?&gt;</strong>
&lt;?php endwhile; endif; elseif(is_home()) : ?&gt;
&lt;meta name="description" content="&lt;?php bloginfo('description'); ?&gt;" /&gt;
&lt;?php endif; ?&gt;</pre>
<p><strong>That function will only generate the META Keywords tag and keywords if the post actually has tags attached to it.</strong> It also filters out static pages, which by default, do not have the ability to be tagged using the Write Page panel.</p>
<p>You could also set some keywords to describe your blog as a whole to be used when on the homepage by doing this:</p>
<pre>&lt;?php if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;
&lt;meta name="description" content="&lt;?php the_excerpt_rss(); ?&gt;" /&gt;
&lt;?php csv_tags(); ?&gt;
&lt;?php endwhile; endif; elseif(is_home()) : ?&gt;
&lt;meta name="description" content="&lt;?php bloginfo('description'); ?&gt;" /&gt;
<strong>&lt;meta name="keywords" content="list,of,keywords,goes,here" /&gt;</strong>
&lt;?php endif; ?&gt;</pre>
<p>I don&#8217;t personally do this, but you certainly could.</p>
<p>So, do what you please.  If you think adding tags as keywords is a good idea for your blog or website, then by all means try it out! If it works, great! If not, you can always just remove the code and probably won&#8217;t be any worse off for trying.</p>
<p><strong>What are your thoughts?</strong> I&#8217;m curious to know if anyone has any information on META Keywords that I&#8217;m unaware of.  If I was mistaken in the post, I&#8217;d be happy to correct myself.</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Descriptions'>Ultimate Guide to WordPress SEO &#8211; META Descriptions</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Optimized Titles'>Ultimate Guide to WordPress SEO &#8211; Optimized Titles</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-keyword-density/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Keyword Density'>Ultimate Guide to WordPress SEO &#8211; Keyword Density</a></li>
<li><a href='http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/' rel='bookmark' title='Permanent Link: WordPress SEO &#8211; The Ultimate Guide to WordPress Theme Search Engine Optimization'>WordPress SEO &#8211; The Ultimate Guide to WordPress Theme Search Engine Optimization</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-indexing-control/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Indexing Control'>Ultimate Guide to WordPress SEO &#8211; Indexing Control</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-keywords/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Ultimate Guide to WordPress SEO &#8211; META Descriptions</title>
		<link>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/</link>
		<comments>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 11:00:44 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Planet WordPress]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[WordPress Tricks]]></category>
		<category><![CDATA[meta description]]></category>
		<category><![CDATA[search engine optimization]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[serp]]></category>
		<category><![CDATA[the_excerpt]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress search engine optimization]]></category>
		<category><![CDATA[wordpress seo]]></category>
		<category><![CDATA[wordpress theme]]></category>
		<category><![CDATA[wordpress theme seo]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/?p=147</guid>
		<description><![CDATA[Want to know how to control how search engines display your content on their results pages? Then check out this tip in our WordPress SEO Series!]]></description>
			<content:encoded><![CDATA[<p>One of the tricks to <a title="WordPress SEO" href="http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/">WordPress SEO</a> is understanding that it&#8217;s not all about rankings.  Sure, high rankings for your target keywords are awesome, and they definitely produce great returns, but lower rankings aren&#8217;t bad all the time either. <strong>If we think about a search engine results page (SERP) as a billboard for our content, then sure, position matters, but so does the content of our billboard.</strong></p>
<p>And that&#8217;s exactly what we can do using the <a href="http://www.seologic.com/faq/meta-descriptions.php">META description</a> tag.  We can actually control what gets displayed in our little spot of SERP real estate, therefore <strong>utilizing a tremendous opportunity to convert that space into traffic.</strong><span id="more-147"></span></p>
<p>Have you ever been linked to from another blog? Don&#8217;t you sometimes wish you could have had some say as to what was said in the blog post that linked to you?  It&#8217;s the same concept with using the META description to control the content that describes the page in a SERP.</p>
<h2>Anatomy of a Search Engine Results Page</h2>
<p>Search Engines, like Google, tend to display search results in a very standard format.  Usually the TITLE of the post or page is the link that actually takes you to the post, and under that link is a description of the site linked to.  Under that, you usually find the URL of the page as well.  Here is an image that illustrates my point:</p>
<p><a href="http://www.nathanrice.net/wp-content/uploads/2008/10/picture-21.png"><img class="alignnone size-medium wp-image-148" title="SERP" src="http://www.nathanrice.net/wp-content/uploads/2008/10/picture-21-300x240.png" alt="" width="300" height="240" /></a></p>
<h2>We Can Manipulate All Three Parts</h2>
<p>What most people fail to realize is:</p>
<ol>
<li>Each one of these places can be manipulated by YOU!</li>
<li>Failing to manually manipulate them means you aren&#8217;t taking advantage of free ad space from the search engine!</li>
</ol>
<p>Because search engines are the primary traffic source for most good websites (websites that have good SEO, at least), we can&#8217;t undervalue <strong>potential clicks</strong> to our content.  <strong>If people just scan past our page on the SERP, then we wasted our time getting it ranked!</strong> You need to pull them in! And the way you so that is by manipulating the content of your result in the SERP.</p>
<h2>How To Manipulate Our Result Listing</h2>
<p>Since <strong>there are three parts to every result listing</strong>, there are three parts that we need to manipulate.  Fortunately for you, I&#8217;ve already taught you how to manipulate the TITLE and the URL in this series.  In order to manipulate what the title looks like, you need to <a title="Optimized Title Tags" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/">optimize your TITLE tag</a>.  And in order to manipulate the URL, you need to be sure you&#8217;re <a title="Optimized Permalinks" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-keyword-rich-permalinks/">optimizing your permalinks</a>.</p>
<p>But, here&#8217;s how you change what the result page uses as the description for your content.</p>
<p>Essentially, <strong>you&#8217;re going to want to be ranking for three types of content &#8212; your homepage, your single posts, and your static pages</strong>.  So, we need to determine what the best strategy for displaying the most accurate, relevant description for our content within the META tag, which looks something like this:</p>
<pre id="line1">&lt;<span class="start-tag">meta</span><span class="attribute-name"> name</span>=<span class="attribute-value">"description" </span><span class="attribute-name">content</span>=<span class="attribute-value">"The Description of your content" </span><span class="error"><span class="attribute-name">/</span></span>&gt;</pre>
<p>This tag should go somewhere between the &lt;head&gt;&lt;/head&gt; tags in the header.php file of your WordPress theme.  But out dilemma is, how do we populate the &#8220;content&#8221; section of the META description dynamically based on what content we&#8217;re viewing?  Simple &#8212; we <strong>use a combination of conditional tags and a custom loop</strong> to pull either the sites tagline (if we&#8217;re on the homepage) or the excerpt (if we&#8217;re in a single post or static page).</p>
<p>The final result will look something like this:</p>
<pre>&lt;?php if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;
&lt;meta name="description" content="&lt;?php the_excerpt_rss(); ?&gt;" /&gt;
&lt;?php endwhile; endif; elseif(is_home()) : ?&gt;
&lt;meta name="description" content="&lt;?php bloginfo('description'); ?&gt;" /&gt;
&lt;?php endif; ?&gt;</pre>
<p>In plain English: <strong>if we are viewing a single post or static page, then use the_excerpt_rss as the description for that post or page</strong>.  The reason we use the_excerpt_rss is because it strips out all formatting tags, something that isn&#8217;t useful when not displaying the text. But, <strong>if we are on the homepage, then we need to use the blog&#8217;s tagline</strong> (the bloginfo(&#8216;description&#8217;) outputs the tagline of the blog).</p>
<p>So, by displaying this META description both conditionally and dynamically, we have way more control over what the search engine results page displays as the description of our homepage, static pages, and single posts.</p>
<h2>Even More Control</h2>
<p>Usually, most bloggers don&#8217;t take advantage of the use of the &#8220;optional excerpt&#8221; section of their Write Post panel.  But if you want to exercise even more control over what gets displayed on the SERP for content, then you need to be filling this section out.  If it&#8217;s blank, your post description will just be the first X amount of words in your post.  <strong>But sometimes those words don&#8217;t do a very good job of selling your content</strong>.  In this instance, do something like this:</p>
<p><a href="http://www.nathanrice.net/wp-content/uploads/2008/10/picture-3.png"><img class="alignnone size-medium wp-image-151" title="picture-3" src="http://www.nathanrice.net/wp-content/uploads/2008/10/picture-3-300x274.png" alt="" width="300" height="274" /></a></p>
<p>Now that I have an optional excerpt filled in for that post, let&#8217;s see how that post looks on a <a href="http://www.google.com/search?q=the+problem+with+theme+options">Search Engine Results Page</a>:</p>
<p><a href="http://www.nathanrice.net/wp-content/uploads/2008/10/picture-12.png"><img class="alignnone size-medium wp-image-152" title="picture-12" src="http://www.nathanrice.net/wp-content/uploads/2008/10/picture-12-300x74.png" alt="" width="300" height="74" /></a></p>
<p><strong>Perfection!</strong></p>
<p>So, now you know how I use search engines to generate the majority of my traffic.  I don&#8217;t use the optional excerpt all the time &#8212; not by a long shot.  But whenever I feel like the post needs a good desctiption, and the first few words just don&#8217;t cut it, using this method is absolutely perfect!</p>
<p>Check back next time to see how we use a very similar method to generate META keywords for our content.</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-keywords/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Keywords'>Ultimate Guide to WordPress SEO &#8211; META Keywords</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-indexing-control/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Indexing Control'>Ultimate Guide to WordPress SEO &#8211; Indexing Control</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Optimized Titles'>Ultimate Guide to WordPress SEO &#8211; Optimized Titles</a></li>
<li><a href='http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/' rel='bookmark' title='Permanent Link: WordPress SEO &#8211; The Ultimate Guide to WordPress Theme Search Engine Optimization'>WordPress SEO &#8211; The Ultimate Guide to WordPress Theme Search Engine Optimization</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-google-sitemaps/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Google Sitemaps'>Ultimate Guide to WordPress SEO &#8211; Google Sitemaps</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>An Easy Way To Get the Contents of a Custom Field</title>
		<link>http://www.nathanrice.net/blog/an-easy-way-to-get-the-contents-of-a-custom-field/</link>
		<comments>http://www.nathanrice.net/blog/an-easy-way-to-get-the-contents-of-a-custom-field/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 11:00:50 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Planet WordPress]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[WordPress Tricks]]></category>
		<category><![CDATA[custom fields]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress theme]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/?p=133</guid>
		<description><![CDATA[If you do any hardcore WordPress coding, then you&#8217;re probably aware of Custom Fields and the unlimited possibilities they offer you as a WordPress designer or developer.  For instance, I use custom fields as a means of attaching a feature image and thumbnail to posts in my Proximity News Theme.
But, they can be a bit [...]]]></description>
			<content:encoded><![CDATA[<p>If you do any hardcore WordPress coding, then you&#8217;re probably aware of <a title="WordPress Custom Fields" href="http://codex.wordpress.org/Using_Custom_Fields">Custom Fields</a> and the unlimited possibilities they offer you as a WordPress designer or developer.  For instance, I use custom fields as a means of attaching a feature image and thumbnail to posts in my <a title="WordPress News Theme" href="http://www.nathanrice.net/proximity/">Proximity News Theme</a>.</p>
<p>But, they can be a bit cumbersome to use throughout your theme because of the ridiculous amount of code that it takes just to pull the data out and display it.<span id="more-133"></span></p>
<p>Conventionally, <a title="Custom Field Values" href="http://justintadlock.com/archives/2007/10/24/using-wordpress-custom-fields-introduction">here&#8217;s how</a> you would pull the data from a custom field where the key = image and use the value of that field as the &#8220;src&#8221; value in an IMG tag:</p>
<pre>&lt;?php $image = get_post_meta($post-&gt;ID, 'image', TRUE); ?&gt;
&lt;?php if($image) { ?&gt;&lt;img src="&lt;?php echo $image; ?&gt;" alt="Alt Text" /&gt;&lt;?php } ?&gt;</pre>
<p>Putting the value from the custom field into a variable definitely cuts down on the amount of code you have to write, but by utilizing a simple PHP function, <strong>we can make using custom fields even easier</strong>!  Open up your theme&#8217;s functions.php file and paste the following code somewhere between PHP tags:</p>
<pre>function get_custom_field($key, $echo = FALSE) {
	global $post;
	$custom_field = get_post_meta($post-&gt;ID, $key, true);
	if ($echo == FALSE) return $custom_field;
	echo $custom_field;
}</pre>
<p>Now, when you want to get the value of the custom field, you simply use the function in your theme files like so:</p>
<pre>&lt;?php get_custom_field('image', TRUE); ?&gt;</pre>
<p>Using the &#8220;TRUE&#8221; value makes sure that the function actually <a href="http://www.php.net/echo">echos</a> the value, rather than just <a href="http://de3.php.net/return">returning</a> it.  But if for some reason, you need to use the value of the custom field (for instance, to store in a variable), then you can return the value instead of echoing it like so:</p>
<pre>&lt;?php get_custom_field('image', FALSE); ?&gt;</pre>
<p>Also, you could change the value of the $echo varialble in the function declaration to TRUE if you would like the default for the function to be to echo the value, rather than return it.  It&#8217;s really up to your preferences.</p>
<p>Now, let&#8217;s take it one step further.  Let&#8217;s recycle some code from our <em><strong>get_custom_field</strong></em> function and use it in a function that will check to see if that custom field has a value &#8212; and if it does, then to use that value, along with the proper IMG tags to output an image, including width and height specifications:</p>
<pre>function image_attachment($key, $width, $height) {
	global $post;
	$custom_field = get_post_meta($post-&gt;ID, $key, true);

	if($custom_field) { //if the user set a custom field
		echo '&lt;img src="'.$custom_field.'" alt="" width="'.$width.'" height="'.$height.'"/&gt;';
	}
	else { //else, return
		return;
	}
}</pre>
<p>Then, just use the function in your theme files.  This example would echo the image with a width and height of 100px:</p>
<pre>&lt;?php image_attachment('image', 100, 100); ?&gt;</pre>
<p>Cool, huh? :-)  Feel free to experiment with the many, many opportunities these kinds of shortcuts can bring you.</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/how-to-redirect-a-page-using-custom-fields-in-wordpress/' rel='bookmark' title='Permanent Link: How To Redirect a Page Using Custom Fields in WordPress'>How To Redirect a Page Using Custom Fields in WordPress</a></li>
<li><a href='http://www.nathanrice.net/blog/definitive-sticky-posts-guide-for-wordpress-27/' rel='bookmark' title='Permanent Link: Definitive Sticky Posts Guide for WordPress 2.7'>Definitive Sticky Posts Guide for WordPress 2.7</a></li>
<li><a href='http://www.nathanrice.net/blog/serve-ie6-visitors-the-default-wordpress-theme/' rel='bookmark' title='Permanent Link: Serve IE6 Visitors the Default WordPress Theme'>Serve IE6 Visitors the Default WordPress Theme</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-keyword-rich-permalinks/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Keyword-Rich Permalinks'>Ultimate Guide to WordPress SEO &#8211; Keyword-Rich Permalinks</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Descriptions'>Ultimate Guide to WordPress SEO &#8211; META Descriptions</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/an-easy-way-to-get-the-contents-of-a-custom-field/feed/</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
		<item>
		<title>Ultimate Guide to WordPress SEO &#8211; Optimized Heading Tags</title>
		<link>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-heading-tags/</link>
		<comments>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-heading-tags/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 11:00:34 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Planet WordPress]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[search engine optimization]]></category>
		<category><![CDATA[semantic header tags]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress search engine optimization]]></category>
		<category><![CDATA[wordpress seo]]></category>
		<category><![CDATA[wordpress theme]]></category>
		<category><![CDATA[wordpress theme seo]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/?p=127</guid>
		<description><![CDATA[Last year I read an article at Chris Pearson&#8217;s website that absolutely changed the way I looked at markup standards and WordPress SEO.  Seriously, up until that point, I was convinced that SEO was a bunch of garbage for blackhat guys who were looking to game the system and cheat the rest of us. [...]]]></description>
			<content:encoded><![CDATA[<p>Last year I read <a title="Semantic Web Markup" href="http://www.pearsonified.com/2007/04/definitive-guide-to-semantic-markup.php">an article</a> at <a href="http://www.pearsonified.com/">Chris Pearson&#8217;s website</a> that <strong>absolutely changed</strong> the way I looked at markup standards and <a title="WordPress SEO" href="http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/">WordPress SEO</a>.  Seriously, up until that point, I was convinced that SEO was a bunch of garbage for blackhat guys who were looking to game the system and cheat the rest of us.  But after reading that article, I came away with a new perspective &#8212; <strong>Your markup is not simply a method for adding structure to style, but was the primary method search engines used to parse your content.</strong></p>
<p>That day, I stopped using H2 in the sidebars of blog.  I stopped using H1 for my blog&#8217;s title (and the blogs I would have the privilege of developing).  And that&#8217;s what we&#8217;re going to cover in this post &#8212; how you can do the exact same thing!<span id="more-127"></span></p>
<p>I understand that for most of you, hacking your WordPress theme up isn&#8217;t an option; you simply don&#8217;t know enough about it to modify it without fear of seriously screwing something up.  So yes, <strong>in this post, I am speaking primarily to developers and people who are relatively comfortable editing theme files</strong>.  If that&#8217;s not you, then while this information may be useful to you, it probably doesn&#8217;t have any practical value, at least in the short term.</p>
<h2>Understanding Structure</h2>
<p>Yesterday, <a title="SEO Title Tags" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/">I mentioned</a> that the most important content in your pages markup is what text falls between the &lt;title&gt;&lt;/title&gt; tags, and following in a close second is what falls between &lt;h1&gt;&lt;/h1&gt; tags.  H1 is an HTML tag that means &#8220;Header 1&#8243; or &#8220;Primary Header&#8221;.  Likewise, H2 means &#8220;Secondary Header&#8221;, and so on for H3, H4, etc., all the way up to H6.</p>
<p>So, it makes sense that search engines would look to the HEADINGS of your page content to determine, very quickly, what the content of the page consists of.</p>
<p><strong>And if you don&#8217;t understand, and leverage, that fact, then you are putting yourself at a severe disadvantage from an SEO perspective.</strong></p>
<h2>Only use H1 Once</h2>
<p><strong>Let me make one thing clear: the H1 tag should only be used ONCE on any given page</strong>.  There is no such thing as two &#8220;Primary Headers&#8221;.  You may disagree with me on this, but <strong>I am convinced that using the H1 multiple times on a page will affect your SEO adversely</strong>.</p>
<p>That means that all you developers and bloggers out there who have your title or logo (via the image replacement technique) being served up in H1 tags &#8212; you need to get rid of this, now. Think about it, if you&#8217;re blog title is being served up in H1 tags, and the title of your post is being served up in H1 tags (which it should), then what is the primary header?</p>
<h2>TITLE and H1 Content Should Match</h2>
<p>Although <a href="http://www.w3.org/TR/REC-html40/struct/global.html#h-7.4.2">they don&#8217;t have to</a>, it makes sense that if you are properly structuring your TITLE with your targeted keywords, then <strong>putting double emphasis on that by having it in both the TITLE and the H1 will only serve to further communicate to search engines that your content is important</strong>.</p>
<h2>H2 Is for Sub-Headings</h2>
<p>&#8230;<strong>and it makes perfect sense to have multiple subheadings</strong>.  In fact, you may notice that the subheadings I used in this blog post are being served up in H2 tags.  Should you be stuffing H2 tags with keywords? You probably could, but as with any of the SEO methods I&#8217;ve outlined in this series, don&#8217;t force it.</p>
<h2>Sidebars and the H2 Tag</h2>
<p>It is a sad fact that, by default, WordPress serves up Widget titles within the H2 tag.  This is so completely counter-intuitive for semantic, structured markup.  <strong>Do you really consider the titles of your sidebar widgets to be important information?</strong> No.  Of course not.</p>
<p>For tips on getting your Widgets to use a different heading tag for titles, check out <a href="http://automattic.com/code/widgets/themes/">this tutorial</a> by Automattic.  I&#8217;ll also write a more detailed tutorial in the future for MAXIMUM control over the look and feel of widgets in themes.</p>
<h2>Everything Else</h2>
<p>From H3 to H6, it&#8217;s really just a matter of using the tag you think represents the importance of the content you&#8217;re wrapping the tags around.  For instance, I choose to use the H3 tag around my sidebar and widget titles.  I think it makes good sense, but you may have some content that you think is more deserving of the H3 tag and choose to use the H4 tag for widget titles.  It&#8217;s really up to you.</p>
<h2>Practical Application</h2>
<p>I know I&#8217;ve been speaking in mostly theory in this post, but really, if you&#8217;re a developer, you probably already know how to apply this information in a WordPress theme.  But generally, here are some good places to look:</p>
<ul>
<li>To remove the H1 tag from the blog title or logo, look in the header.php file.</li>
<li>To remove the H2 tag from the widgets, you&#8217;ll want to modify the widgetization code in functions.php.</li>
<li>To use the H1 tag as a single post or Page title, check out single.php and page.php.</li>
<li>To use H2 tags in single posts or Pages, use the HTML editor or use the <a href="http://codex.wordpress.org/TinyMCE#Advanced_Editing_Buttons">extended WYSIWYG options</a></li>
</ul>
<p>Hopefully this has been helpful.  Tomorrow, we&#8217;ll finally get into some advanced stuff that will give you an advantage over most of your peers.  Don&#8217;t miss it!</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Optimized Titles'>Ultimate Guide to WordPress SEO &#8211; Optimized Titles</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Descriptions'>Ultimate Guide to WordPress SEO &#8211; META Descriptions</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-keywords/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Keywords'>Ultimate Guide to WordPress SEO &#8211; META Keywords</a></li>
<li><a href='http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/' rel='bookmark' title='Permanent Link: WordPress SEO &#8211; The Ultimate Guide to WordPress Theme Search Engine Optimization'>WordPress SEO &#8211; The Ultimate Guide to WordPress Theme Search Engine Optimization</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-keyword-density/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Keyword Density'>Ultimate Guide to WordPress SEO &#8211; Keyword Density</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-heading-tags/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Ultimate Guide to WordPress SEO &#8211; Optimized Titles</title>
		<link>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/</link>
		<comments>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 11:00:39 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Planet WordPress]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[search engine optimization]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[title]]></category>
		<category><![CDATA[title seo]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress search engine optimization]]></category>
		<category><![CDATA[wordpress seo]]></category>
		<category><![CDATA[wordpress theme]]></category>
		<category><![CDATA[wordpress theme seo]]></category>
		<category><![CDATA[wordpress title]]></category>
		<category><![CDATA[wordpress title tag]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/?p=121</guid>
		<description><![CDATA[Arguably, one of the most important elements of a website from an SEO perspective is what comes between the &#60;title&#62;&#60;/title&#62; tags in the header of your page. Take a look at any search result page in Google and you&#8217;re probably looking at a list of websites with big blue links &#8230; and the text of [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Arguably, one of the most important elements of a website from an SEO perspective is what comes between the &lt;title&gt;&lt;/title&gt; tags in the header of your page.</strong> Take a look at any search result page in Google and you&#8217;re probably looking at a list of websites with big blue links &#8230; and the text of those links is none other than the text Google found between the &lt;title&gt;&lt;/title&gt; tags when crawling the page.</p>
<p>So, this next post in our <a title="WordPress SEO" href="http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/">WordPress SEO</a> series will cover how to control what gets displayed in that section of our site, and thus not only controlling what the Search Engines display as the title of our post/page in results pages, but also leveraging a powerful tool for ranking for those keywords we&#8217;re targeting.<span id="more-121"></span></p>
<p>While the complete order of <a title="HTML Tag Importance" href="http://www.searchnewz.com/searchnewz-12-20030715HTMLTagOrderandSearchEnginePositioning.html">tag importance is debated</a>, one thing is for sure: the &lt;title&gt; and &lt;h1&gt; tags are definitely at the top in terms of importance for search rankings.  Think about your tags as a means of communication with the search engines rather than display elements.  <strong>What you put between the &lt;title&gt;&lt;/title&gt; tags is considered by the search engines to be THE MOST important information about the page it is viewing.</strong></p>
<p>So, being able to control this is vitally important.</p>
<h2>Structure</h2>
<p>If you look at just about any WordPress theme worth its salt, you will find the title generating code in the header.php file, and it will look something like this:</p>
<pre>&lt;title&gt;&lt;?php bloginfo('name'); ?&gt; &lt;?php if ( is_single() ) { ?&gt; &amp;raquo; Blog Archive &lt;?php } ?&gt; &lt;?php wp_title(); ?&gt;&lt;/title&gt;</pre>
<p>As you can see, <strong>we are going to be doing some intermediate code hacking in this tutorial, so be prepared.</strong></p>
<p>What you&#8217;re seeing are called &#8220;Template Tags&#8221; and they are what WordPress Themes use to display dynamic content that is being stored in the database.  For a complete list of these template tags, view <a href="http://codex.wordpress.org/Template_Tags">this Codex Page</a>.</p>
<p>The template tags we&#8217;re interested in are <a href="http://codex.wordpress.org/Template_Tags/wp_title">wp_title()</a>, <a href="http://codex.wordpress.org/Template_Tags/bloginfo">bloginfo(&#8216;name&#8217;)</a>, and <a href="http://codex.wordpress.org/Template_Tags/bloginfo">bloginfo(&#8216;description&#8217;)</a>.  Respectively, they output the title of a single post or page and the name and tagline of your site (as defined in your Settings).  Many themes have started optimizing this section automatically, and some have even gone as far as using many conditional tags to display specific information related to various archives (tag, category, date, etc.), but <strong>I have found it more than adequate to optimize for Single Posts, Pages, and your homepage.</strong></p>
<h2>The Default Theme</h2>
<p>The default theme structures it&#8217;s &lt;title&gt; text like such:</p>
<pre>&lt;title&gt;&lt;?php bloginfo('name'); ?&gt; &lt;?php if ( is_single() ) { ?&gt; &amp;raquo; Blog Archive &lt;?php } ?&gt; &lt;?php wp_title(); ?&gt;&lt;/title&gt;</pre>
<p>Now, this format is actually <strong>bad for SEO</strong>, since the content it puts first is the title of your blog/website.  Remember how results pages in Google show the content of the &lt;title&gt; for results?  Well, <strong>if you want people to actually click on your page/post when viewing reults, then you need to give them the title of your post/page as soon as possible</strong>.  The most irrelevant part of your titles is your blog&#8217;s name.  So, move it to the end instead of the beginning.</p>
<p>Here&#8217;s a quick way of doing it:</p>
<pre>&lt;title&gt;&lt;?php wp_title(''); ?&gt;&lt;?php if(wp_title('', false)) { echo ' :: '; } ?&gt;&lt;?php bloginfo('name'); if(is_home()) { echo ' :: '; bloginfo('description'); } ?&gt;&lt;/title&gt;</pre>
<p>In a nutshell, this code does the following &#8212; if viewing the homepage, it will display &#8220;Title of Blog :: Tagline of Blog&#8221; &#8212; and if viewing a single post or page it will display &#8220;Title of Post :: Title of Blog&#8221;.  This puts your most important content first!</p>
<h2>You Don&#8217;t Need a Plugin</h2>
<p>I know that a lot of you out there are screaming at your screen for me to just recommend using a plugin like the <a title="SEO Plugin" href="http://www.shaunlow.com/the-all-in-one-seo-pack/">All-In-One SEO Pack</a>, which will handle this &lt;title&gt; optimization for you, and even give you more options than you can get by modifying your theme.  That&#8217;s true, but please hear me out &#8230;</p>
<p>Yes, <strong>I do believe in using themes, not plugins, for outputting HTML that will be publically visible</strong>.  But if you insist on using a plugin, then let me <strong>please encourage you NOT TO USE a certain feature of the All-In-One SEO Pack</strong>.  That feature would be the &#8220;Custom Title&#8221; feature, which will allow you to use title text other than the text in your ACTUAL post/page title.</p>
<p>Some people find this advantageous because it allows you to &#8220;keyword stuff&#8221; their title, and game the system.  But <strong>in my opinion, if this continues, the search engines will downgrade the value of the &lt;title&gt; and hurt everyone&#8217;s rankings</strong>.</p>
<p>So, as an alternative, if you want to use keywords in your &lt;title&gt;, then you need to use them in the ACTUAL title of the post or page.  And using the method I outlined above will do that very thing.  <strong>I&#8217;m certainly not discouraging you from using keywords in your Title, but if it can be avoided, for the sake of the future of your content, make the &lt;title&gt; and the Post/Page title exactly the same.</strong></p>
<p>Tomorrow, we&#8217;ll be talking about header tags &#8212; when to use which tag (h1, h2, h3, etc.) for the most SEO benefit. Don&#8217;t miss it!</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-heading-tags/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Optimized Heading Tags'>Ultimate Guide to WordPress SEO &#8211; Optimized Heading Tags</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Descriptions'>Ultimate Guide to WordPress SEO &#8211; META Descriptions</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-keywords/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Keywords'>Ultimate Guide to WordPress SEO &#8211; META Keywords</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-indexing-control/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Indexing Control'>Ultimate Guide to WordPress SEO &#8211; Indexing Control</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-keyword-density/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Keyword Density'>Ultimate Guide to WordPress SEO &#8211; Keyword Density</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>Ultimate Guide to WordPress SEO &#8211; Keyword-Rich Permalinks</title>
		<link>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-keyword-rich-permalinks/</link>
		<comments>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-keyword-rich-permalinks/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 11:00:11 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Planet WordPress]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[keyword rich permalinks]]></category>
		<category><![CDATA[permalinks]]></category>
		<category><![CDATA[search engine optimization]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress permalinks]]></category>
		<category><![CDATA[wordpress search engine optimization]]></category>
		<category><![CDATA[wordpress seo]]></category>
		<category><![CDATA[wordpress theme]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/?p=111</guid>
		<description><![CDATA[WordPress.org describes permalinks as &#8220;the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings.&#8221;
But permalinks themselves won&#8217;t help if you haven&#8217;t optimized them.  Understanding the role your permalinks play in your WordPress SEO starts with understanding the methods for permalink optimization.  Keyword-rich permalinks, along with the other [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress.org <a title="WordPress Permalinks" href="http://codex.wordpress.org/Using_Permalinks">describes</a> permalinks as &#8220;the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings.&#8221;</p>
<p>But <strong>permalinks themselves won&#8217;t help if you haven&#8217;t optimized them</strong>.  Understanding the role your permalinks play in your <a title="WordPress SEO" href="http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/">WordPress SEO</a> starts with understanding the methods for permalink optimization.  <strong>Keyword-rich permalinks, along with the other ingredients in this series, will help search engines determine the kind of content in your posts/pages, and rank them accordingly</strong>.<span id="more-111"></span></p>
<h2>Understanding Permalinks</h2>
<p>Before we optimize our permalinks, we need to understand what they are. Permalinks aren&#8217;t always pretty.  In fact, WordPress calls the &#8220;example.com/?p=11&#8243; format &#8220;Ugly Permalinks&#8221;, and they&#8217;re right &#8230; they are ugly, and unfortunately they do absolutely nothing to help you reach your SEO goals.</p>
<p><strong>What we want is &#8220;Pretty Permalinks&#8221; &#8230; permalinks that include actual words</strong>, and not arbitrary numbers.</p>
<h2>How WordPress Handles Permalinks</h2>
<p>WordPress handles permalinks in one of two ways: either the &#8220;ugly&#8221; way, or the &#8220;pretty&#8221; way.  And, <strong>by default, your site will have &#8220;ugly&#8221; permalinks</strong>.  So you need to make the &#8220;pretty&#8221;.  In order to do this, you will need two things: 1. access to your WordPress admin, and 2. the ability to make your .htaccess file (located at the root of your WordPress directory) writable.</p>
<p>You see, WordPress uses the Apache mod-rewrite module in order to take pretty permalinks (example.com/category/some-title-of-some-post/) and return the correct post based on the permalink structure.  Normally, there would have to be a &#8220;category&#8221; folder at the root of your example.com directory, and in that folder there would have to be another folder named &#8220;some-title-of-some-post&#8221;, and in that folder there would have to be a web document with your data.  In the case of &#8220;pretty permalinks&#8221;, the webserver takes the URL requested and returns data using the words in the URL as the variables for use in querying the database.</p>
<p><strong>If all that goes over your head, don&#8217;t worry</strong>.  It&#8217;s not that important.  Just know that it works.</p>
<h2>Setting Up WordPress</h2>
<p>So, how do you use Pretty Permalinks? Simple.</p>
<p>Log into your WordPress Dashboard and click &#8220;Settings&#8221; then &#8220;Permalinks&#8221; (in the submenu).  The configuration page will look something like this:</p>
<p><a href="http://www.nathanrice.net/wp-content/uploads/2008/10/picture-11.png"><img class="alignnone size-medium wp-image-112" title="picture-11" src="http://www.nathanrice.net/wp-content/uploads/2008/10/picture-11-300x127.png" alt="" width="300" height="127" /></a></p>
<p>As you can see, on this site I am using a custom structure for my permalink structure.  I use the /category-name/title-of-blog-post/ structure, and I find that this works best for me.  And to be honest, I really recommend this structure for you as well, because your <strong>categories tend to describe your content</strong>.  Having them in the URL will more than likely help you.</p>
<p><strong>So, choose the structure that works best for you</strong>.  And if you must choose a custom structure other than the one I used, see <a href="http://codex.wordpress.org/Using_Permalinks#Structure_Tags">this reference</a> for how to do it.</p>
<h2>Using Keyword Rich Permalinks</h2>
<p>Now, as you can see from the image above, I&#8217;ve chosen to just use the title of my post (with words separated by dashes, which is the way WordPress does it) as the majority of my permalink.  That&#8217;s fine if you&#8217;re doing a good job of Optimizing your titles (which we&#8217;ll cover in a couple of days), but if you are <a title="Writing for Humans" href="http://www.copyblogger.com/writing-for-seo/">writing your headlines for humans</a> rather than machines, you&#8217;ll want to gain as much advantage as you can by changing your permalink speak to the machines (the spiders) for you.</p>
<p>And <strong>in WordPress 2.5+, changing your permalink is very very easy</strong>.  Here&#8217;s a picture of this post as I am writing it:</p>
<p><a href="http://www.nathanrice.net/wp-content/uploads/2008/10/picture-2.png"><img class="alignnone size-medium wp-image-113" title="picture-2" src="http://www.nathanrice.net/wp-content/uploads/2008/10/picture-2-300x161.png" alt="" width="300" height="161" /></a></p>
<p>Now, you may notice that right below the Title of this post, I&#8217;ve chosen to &#8220;edit&#8221; my permalink.  So, if this post were titled something catchy like &#8220;Fight the Power, Use URLs to Drive Traffic&#8221;, but I wanted to rank well for search terms like &#8220;<em><strong>wordpress seo</strong></em>&#8220;, &#8220;<em><strong>keywords permalinks</strong></em>&#8220;, and &#8220;<em><strong>wordpress permalinks</strong></em>&#8220;, then the permalink WordPress generated for me wouldn&#8217;t do me much good, would it?</p>
<p>So, we edit it.  <strong>We put in the keywords we want to rank for</strong>. Just click save and you&#8217;re done.  Once published, your URL will reflect the keywords you want to rank for, even if your title doesn&#8217;t.</p>
<h2>Wrapping Up</h2>
<p>You make have noticed a theme in this post.  Keyword Density. <strong>Smart keyword density is key to ranking for the search terms you want to rank for</strong>.  This theme will be prevalent in many of the upcoming posts in this series, so get used to it. <strong>Tomorrow, we&#8217;ll cover how to optimize your &lt;title&gt; tags</strong> using WordPress theme template files and yes, more Keyword Density.  Stay Tuned!</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-keyword-density/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Keyword Density'>Ultimate Guide to WordPress SEO &#8211; Keyword Density</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-deep-linking/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Deep Linking'>Ultimate Guide to WordPress SEO &#8211; Deep Linking</a></li>
<li><a href='http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/' rel='bookmark' title='Permanent Link: WordPress SEO &#8211; The Ultimate Guide to WordPress Theme Search Engine Optimization'>WordPress SEO &#8211; The Ultimate Guide to WordPress Theme Search Engine Optimization</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Descriptions'>Ultimate Guide to WordPress SEO &#8211; META Descriptions</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-indexing-control/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Indexing Control'>Ultimate Guide to WordPress SEO &#8211; Indexing Control</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-keyword-rich-permalinks/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>WordPress SEO &#8211; The Ultimate Guide to WordPress Theme Search Engine Optimization</title>
		<link>http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/</link>
		<comments>http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 16:02:12 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[search engine optimization]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress search engine optimization]]></category>
		<category><![CDATA[wordpress seo]]></category>
		<category><![CDATA[wordpress theme]]></category>
		<category><![CDATA[wordpress theme seo]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/?p=79</guid>
		<description><![CDATA[Learn how to tackle the task of Optimizing your WordPress theme for Search Engines in 10 practical steps.]]></description>
			<content:encoded><![CDATA[<p>The WordPress Codex <a href="http://codex.wordpress.org/Search_Engine_Optimization_for_Wordpress">says</a> that &#8220;<em>WordPress, straight out of the box, comes ready to embrace search engines</em>&#8220;.  Well, that may be true &#8230; to a certain degree, but there is more than enough work that you&#8217;ll need to do <strong>after you&#8217;ve installed WordPress</strong> in order to get it playing nicely with Google (and other search engines).</p>
<p>What most people don&#8217;t realize is that, while <a href="http://corymiller.com/wordpress-themes/8-reasons-why-i-love-wordpress/">Google does love WordPress</a>, it&#8217;s WordPress <strong>THEMES</strong> that actually interface with search engines &#8230; not WordPress itself.</p>
<p>So, that means that a WordPress theme could very well be <strong>hurting</strong> your rankings in the search engines &#8230; <strong>not helping!</strong><span id="more-79"></span></p>
<p>So over the last several months, I&#8217;ve been developing a list of tips for bloggers that will help them embrace the natural flow of good SEO in the form of a well optimized theme.  This guide can&#8217;t guarantee you first page rankings, and certainly can&#8217;t get you quality links, but it will teach you every step you must take to ensure that you&#8217;re site is completely search engine optimized.</p>
<h2>Posts in this Series</h2>
<p>The following posts give a detailed explanation on how and where to modify your theme in order to optimize its search engine rankings:</p>
<ol>
<li><a title="Google Sitemap Generator" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-google-sitemaps/">Generating a sitemap for Google</a></li>
<li><a title="WordPress Google Webmaster Tools" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-google-webmaster-tools/">Getting your site indexed by Google</a></li>
<li><a title="WordPress duplicate content" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-indexing-control/">Getting Google to index and follow the right stuff</a></li>
<li><a title="WordPress Keyword Rich Permalinks" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-keyword-rich-permalinks/">Using Keyword-Rich Permalinks</a></li>
<li><a title="WordPress Title" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/">Optimizing your &lt;title&gt;</a></li>
<li><a title="WordPress Optimized Header Tags" href="http://www.nathanrice.net/blog/ultimage-guide-to-wordpress-seo-optimized-title-tags/">Optimizing your header tags</a></li>
<li><a title="META Descriptions" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/">Using META descriptions</a></li>
<li><a title="WordPress Meta Keywords" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-keywords/">Using META keywords</a></li>
<li><a title="Keyword Density SEO" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-keyword-density/">Keyword Density</a></li>
<li><a title="WordPress Deep Linking SEO" href="http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-deep-linking/">Deep Linking</a></li>
</ol>
<p>For those interested, I&#8217;ve already done all the heavy lifting in my newest theme <a href="http://www.nathanrice.net/proximity/">Proximity News</a>.  All the theme mods I&#8217;ll be discussing have already been implemented in Proximity News, so if you&#8217;re looking for a theme that&#8217;s ready to attract search engine traffic right out of the box, then why not go <a href="http://www.nathanrice.net/proximity/buy-now/">pick yourself up a copy</a> of my latest <a href="http://www.nathanrice.net/proximity/">WordPress news theme</a>!</p>
<p>Ff you haven&#8217;t done so already, go ahead and <a href="http://feeds.feedburner.com/nathanricenet">subscribe to my RSS feed</a> so you&#8217;ll get these tips like these delivered straight to your RSS reader!</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-indexing-control/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Indexing Control'>Ultimate Guide to WordPress SEO &#8211; Indexing Control</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Descriptions'>Ultimate Guide to WordPress SEO &#8211; META Descriptions</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-keywords/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Keywords'>Ultimate Guide to WordPress SEO &#8211; META Keywords</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Optimized Titles'>Ultimate Guide to WordPress SEO &#8211; Optimized Titles</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-deep-linking/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Deep Linking'>Ultimate Guide to WordPress SEO &#8211; Deep Linking</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/wordpress-seo-the-ultimate-guide-to-wordpress-theme-search-engine-optimization/feed/</wfw:commentRss>
		<slash:comments>87</slash:comments>
		</item>
		<item>
		<title>Creating a &#8220;Blog Page&#8221; &#8212; With Paging</title>
		<link>http://www.nathanrice.net/blog/creating-a-blog-page-with-paging/</link>
		<comments>http://www.nathanrice.net/blog/creating-a-blog-page-with-paging/#comments</comments>
		<pubDate>Wed, 14 May 2008 18:32:08 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Planet WordPress]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[WordPress Tricks]]></category>
		<category><![CDATA[archives page]]></category>
		<category><![CDATA[blog page]]></category>
		<category><![CDATA[blog section]]></category>
		<category><![CDATA[seperate blog page]]></category>
		<category><![CDATA[static home page]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress themes]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/?p=75</guid>
		<description><![CDATA[Creating a CMS style theme for WordPress sometimes requires you to move the blog posts to a /blog section.  Here are 3 ways to create a /blog page -- with paging.]]></description>
			<content:encoded><![CDATA[<p>If there was one question I get asked the most about WordPress themes, it&#8217;s this one: how do I make a custom static homepage at the root of my blog&#8217;s address (e.g. http://example.com/) and have my blog posts go into a /blog section (http://example.com/blog)?</p>
<p>WordPress is becoming more and more usable as a Content Management System, so naturally the question comes up.</p>
<p>But they don&#8217;t want to abandon the idea of a blog either.  Blogs can be an integral part of a business website, and it makes sense that businesses and individuals would want the site and the blog managed from the same WordPress installation.<span id="more-75"></span></p>
<h2>The First Option</h2>
<p>The idea is simple &#8230; create a category called &#8220;blog&#8221; and place every single post you create in this category by making it the default category.  Make all other categories &#8220;children&#8221; of the blog category.</p>
<p>This is actually a pretty decent option for users with a fair amount of WordPress experience.  It allows you to accomplish the desired effect, and also lets you create other top-level categories for other purposes than categorizing posts (for instance, using top level categories for things like setting feature posts, press releases, or like me &#8230; theme releases).</p>
<h2>The Second Option</h2>
<p>The second option is a little more complicated, but is certainly a viable option for theme developers releasing themes for mass distribution (this is the option we use at <a href="http://ithemes.nathanrice.net/">iThemes</a>.  See the <a href="http://ithemes.nathanrice.net/icompany/">iCompany theme</a> as an example.).</p>
<p><strong>Here&#8217;s a step-by-step:</strong></p>
<ol>
<li>Copy your index.php file</li>
<li>Create a new file called blog.php and populate it with the contents of the index.php file</li>
<li>Make it a page template by pasting the <a href="http://www.blogherald.com/2007/05/24/using-wordpress-page-templates/">necessary code at the top</a>. (making sure to change the template name to &#8220;Blog&#8221; instead of &#8220;Bio&#8221;)</li>
<li>Create a new WordPress &#8220;page&#8221; (Write &gt; Page) from your Dashboard</li>
<li>Don&#8217;t worry about content on the page, but make the title &#8220;Blog&#8221;</li>
<li>Before you click publish, scroll down to the &#8220;Advanced Options&#8221; and expand the &#8220;Page Template&#8221; section.  Choose &#8220;Blog&#8221; from the drop down menu.</li>
<li>Click Publish.</li>
</ol>
<p>Now, you&#8217;re going to want to edit the blog.php file one last time.  Find &#8220;<a href="http://codex.wordpress.org/The_Loop">the loop</a>&#8220;.  It should look something like this:</p>
<pre lang="PHP">
< ?php if (have_posts()) : while (have_posts()) : the_post(); ?>
</pre>
<p>Replace that code with this:</p>
<pre lang="PHP">
< ?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('showposts=5'.'&#038;paged='.$paged);
while ($wp_query->have_posts()) : $wp_query->the_post();
?>
</pre>
<p>You can change the &#8220;showposts=5&#8243; to whatever number you want.  It just depends on how many posts you want to be shown on a single page.  Plus, but using &#8216;&#038;paged=&#8217;.$paged we are able to keep paging intact &#8230; a problem that kept many people from using this method in the past.</p>
<p>Then, find the line of code that looks like this and remove it:</p>
<pre lang="PHP">
< ?php else : ?>
</pre>
<p>You&#8217;ll also probably want to remove any thing that has to do with not being able to find the page you were looking for.  Hopefully you have a 404.php file that will take care of that for you.</p>
<p>Finally, after you&#8217;ve done the above, find the following code:</p>
<pre lang="PHP">
< ?php endif; ?>
</pre>
<p>and change it to:</p>
<pre lang="PHP">
< ?php $wp_query = null; $wp_query = $temp;?>
</pre>
<h2>The Third Option</h2>
<p>The final option is by far the easiest for the end user.  It requires no code editing at all and accomplishes the same goal as the other 2 methods.  The only problem is that it does screw up the &#8220;current_page_item&#8221; class for the home link and the blog link.  Check out the <a href="http://wordpressgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/">possible solutions</a> here.</p>
<p>Anyway, here&#8217;s how to do it.</p>
<p>The first thing you need to do is create a blog Page.  Nothing fancy here, just write a new Page, title it &#8220;Blog&#8221;, and click &#8220;publish&#8221;. No need for any content.</p>
<p>Then, Assuming you&#8217;re still on the dashboard, click on Setting &gt; Reading. Once there, you should see something that looks like this:</p>
<p><img src="http://www.nathanrice.net/wp-content/uploads/2008/05/reading-settings.jpg" alt="Default Reading Settings" /></p>
<p>Go ahead and click the radio button that says &#8220;A Static Page&#8221;.  Then, you&#8217;re going to want to choose a page to use as your front page (any one of your pages will do), and you&#8217;re going to want to choose your &#8220;Blog Page&#8221; as the page to use for the posts.</p>
<p>Voila! You&#8217;re done! Save the settings and you should now be using one of your Pages as your homepage, and your blog Page is now housing all of your posts (and yes, paging does work with this method as well).</p>
<h2>Conclusion</h2>
<p>So there you go! Three different ways to accomplish the same general goal.  If you have any suggestions for a better way of getting this done, feel free to leave a comment below and if it works well, then I&#8217;ll add it to the post.</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/wordpress-single-post-templates/' rel='bookmark' title='Permanent Link: WordPress Single Post Templates'>WordPress Single Post Templates</a></li>
<li><a href='http://www.nathanrice.net/blog/how-to-redirect-a-page-using-custom-fields-in-wordpress/' rel='bookmark' title='Permanent Link: How To Redirect a Page Using Custom Fields in WordPress'>How To Redirect a Page Using Custom Fields in WordPress</a></li>
<li><a href='http://www.nathanrice.net/blog/3-ways-to-optimize-your-blog-homepage/' rel='bookmark' title='Permanent Link: 3 Ways to Optimize Your Blog Homepage'>3 Ways to Optimize Your Blog Homepage</a></li>
<li><a href='http://www.nathanrice.net/blog/wordpress-2-8-and-the-body_class-function/' rel='bookmark' title='Permanent Link: WordPress 2.8 and the body_class() Function'>WordPress 2.8 and the body_class() Function</a></li>
<li><a href='http://www.nathanrice.net/blog/definitive-sticky-posts-guide-for-wordpress-27/' rel='bookmark' title='Permanent Link: Definitive Sticky Posts Guide for WordPress 2.7'>Definitive Sticky Posts Guide for WordPress 2.7</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/creating-a-blog-page-with-paging/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>WordPress Single Post Templates</title>
		<link>http://www.nathanrice.net/blog/wordpress-single-post-templates/</link>
		<comments>http://www.nathanrice.net/blog/wordpress-single-post-templates/#comments</comments>
		<pubDate>Tue, 13 May 2008 19:47:48 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Planet WordPress]]></category>
		<category><![CDATA[Web Design Tips]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[WordPress Tricks]]></category>
		<category><![CDATA[page templates]]></category>
		<category><![CDATA[post template]]></category>
		<category><![CDATA[post templates]]></category>
		<category><![CDATA[single post template]]></category>
		<category><![CDATA[single.php]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress themes]]></category>
		<category><![CDATA[wordress single post template]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/?p=74</guid>
		<description><![CDATA[Ever wondered how to create a custom template for WordPress posts based on category? You can do it with pages, and now you can do it with posts too!]]></description>
			<content:encoded><![CDATA[<p class="alert">I&#8217;ve recently released a plugin that is far more robust than the methods outlined below. It actually duplicates the functionality of WordPress Page Templates, and allows you to create individual post templates, selectable on a per post basis via a dropdown menu. Head over to my <a href="http://www.nathanrice.net/plugins/">WordPress Plugins</a> page and find the &#8220;Post Templates Plugin&#8221;</p>
<p><strong>UPDATED:</strong><br />
<em><a href="http://www.ilfilosofo.com/">Austin</a> recommends using a filter in your functions.php file as an alternative to the method below.  IMO, his suggestion is much simpler and quite elegant.  Here&#8217;s the code to add to your theme&#8217;s functions.php file. (be sure you paste this code between &lt;?php ?&gt; tags):</em></p>
<pre lang="PHP" line="0">
add_filter('single_template', create_function('$t', 'foreach( (array) get_the_category() as $cat ) { if ( file_exists(TEMPLATEPATH . "/single-{$cat->term_id}.php") ) return TEMPLATEPATH . "/single-{$cat->term_id}.php"; } return $t;' ));
</pre>
<p><em>It helps solve the multiple categories issue since it cycles through all the categories in the array and checks to see which one of them has an associated post template.  When it finds one, it uses the post template file, but if it doesn&#8217;t, then it falls back on the default single.php template.</p>
<p>So if you are used to placing posts in multiple categories, be sure to only create post templates for the categories you know won&#8217;t ever conflict.</p>
<p>Again, I highly recommend using this technique.  It&#8217;s much simpler and works much better.  If you care to, however, the original article is still below.</em><br />
<strong>END UPDATE</strong></p>
<p>A few months ago, I <a href="http://www.blogherald.com/2007/05/24/using-wordpress-page-templates/">wrote a post over at the Blog Herald</a> explaining how to set up and use <a href="http://codex.wordpress.org/Pages#Page_Templates">WordPress Page Templates</a> to control the way indivudual WordPress &#8220;Pages&#8221; appeared on your blog.  The process was pretty simple &#8230; create the page template, insert the necessary code at the top of the file, and upload it to your themes folder.</p>
<p>What what about blog posts?  As far as I could tell, there&#8217;s no way to do a similar thing with single posts without some <a href="http://www.webdesignerwall.com/tutorials/wordpress-theme-hacks/">manual code</a> (see the &#8220;Unique Single Template&#8221; section).</p>
<blockquote><p>Is it possible to have post templates like page templates???</p></blockquote>
<p><a href="http://corymiller.com/">Cory</a> sent me this simple question a few days ago, and it got me thinking. So I started investigating.<span id="more-74"></span></p>
<h2>The Setup</h2>
<p>You&#8217;re going to need 3 things:</p>
<ol>
<li>A basic knowledge of WordPress Themes</li>
<li>A single.php file</li>
<li>Multiple single templates, named according to category ID</li>
</ol>
<h2>The Code</h2>
<p>What we&#8217;re going to do is create single post templates according to the ID of the category the post is filed under.  In order to determine what category a post is filed under, we&#8217;re going to use the <a href="http://codex.wordpress.org/Template_Tags/get_the_category">get_the_category</a> template tag.  Then we&#8217;re going to pull out the first category the post is filed under.  Insert the following code at the TOP of your single.php file in your theme folder:</p>
<pre lang="PHP" line="0">
< ?php
$category = get_the_category();
$currentcat = $category[0]->cat_ID;
?>
</pre>
<p>Be aware, if you file posts under multiple categories, chances are this method will not work as you intended.</p>
<p>Then, we&#8217;ll add a little PHP magic to pull in the template file you created for a particular category:</p>
<pre lang="PHP" line="0">
< ?php
$category = get_the_category();
$currentcat = $category[0]->cat_ID;
if (file_exists(TEMPLATEPATH."/single-$currentcat".".php")) {
include(TEMPLATEPATH."/single-$currentcat".".php");
} else {
?>
</pre>
<p>This code defines the first category the post is filed under, checks to see if a single post template exists for that category (template files look like this: single-1.php, single-2.php, single-3.php, etc.), and uses it if it does.</p>
<p>Finally, we need to put the following code at the <strong>very bottom</strong> of the single.php file, normally just below the wp_footer function:</p>
<pre lang="PHP" line="0">
< ?php } ?>
</pre>
<p>The reason we have to do this is to be able to use the default single.php code as fallback in case you haven&#8217;t created a template for a certain category.</p>
<p>After you&#8217;ve got the code in place, just find the ID of the category you want to create a template for, then create a new file called single-ID.php (be sure to replace ID with the category number).  Just insert the code you want to use for any posts filed in that category and you&#8217;re good to go!</p>
<h2>Limitations</h2>
<p>Like I mentioned earlier, if you are in the habit of filing posts under multiple categories, this code probably won&#8217;t work as intended.  Since we&#8217;re working with templates for use on single posts in single categories, posts in multiple categories may end up falling back to the default single.php template.  You have been warned!</p>
<h2>Sample Code Download</h2>
<p>As always, I like to provide a sample file for you to look at yourself.  In this instance, I&#8217;ve edited the single.php file for the WordPress Default theme to pull in single post templates, if they exist.  Take a look at the code if you have any questions about how it should look in your theme&#8217;s single.php file. I&#8217;ve also commented the code quite thoroughly.</p>
<p><a href="http://www.nathanrice.net/download/single.phps ">Download single.php</a></p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/creating-a-blog-page-with-paging/' rel='bookmark' title='Permanent Link: Creating a &#8220;Blog Page&#8221; &#8212; With Paging'>Creating a &#8220;Blog Page&#8221; &#8212; With Paging</a></li>
<li><a href='http://www.nathanrice.net/blog/comment-link-in-singlephp/' rel='bookmark' title='Permanent Link: Comment Link in single.php'>Comment Link in single.php</a></li>
<li><a href='http://www.nathanrice.net/blog/definitive-sticky-posts-guide-for-wordpress-27/' rel='bookmark' title='Permanent Link: Definitive Sticky Posts Guide for WordPress 2.7'>Definitive Sticky Posts Guide for WordPress 2.7</a></li>
<li><a href='http://www.nathanrice.net/blog/wordpress-2-8-and-the-body_class-function/' rel='bookmark' title='Permanent Link: WordPress 2.8 and the body_class() Function'>WordPress 2.8 and the body_class() Function</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Optimized Titles'>Ultimate Guide to WordPress SEO &#8211; Optimized Titles</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/wordpress-single-post-templates/feed/</wfw:commentRss>
		<slash:comments>68</slash:comments>
		</item>
		<item>
		<title>7 Must-Have Plugins</title>
		<link>http://www.nathanrice.net/blog/7-must-have-plugins/</link>
		<comments>http://www.nathanrice.net/blog/7-must-have-plugins/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 14:47:45 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[Planet WordPress]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[absolute comments]]></category>
		<category><![CDATA[admin drop-down menu]]></category>
		<category><![CDATA[akismet]]></category>
		<category><![CDATA[cforms]]></category>
		<category><![CDATA[feedburner feedsmith]]></category>
		<category><![CDATA[google sitemap generator]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[subscribe to comments]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/?p=65</guid>
		<description><![CDATA[WordPress is great, but sometimes it doesn't do exactly what you want it to do.  And that's why plugins are so awesome!  Here is a list of 7 plugins I install on every WordPress blog I run.]]></description>
			<content:encoded><![CDATA[<p>I run at least 5 WordPress powered websites, and every time I add a new site to that list, I have a checklist of plugins that I absolutely HAVE to get installed ASAP!  Some of them are simply aesthetic plugins, making the dashboard look pretty or more functional, and others are workhorse plugins, absolutely necessary for the site to run smoothly.</p>
<p>I generally don&#8217;t recommend plugins, but everybody has to use them sooner or later.  So I wanted to share with you the 7 plugins that I install every time I begin or upgrade a WordPress installation.<span id="more-65"></span></p>
<h2>1. Akismet</h2>
<p>It should go without saying that if you use comments on your WordPress site, you MUST activate the <a href="http://akismet.com/">Akismet</a> plugin.  Without it, I would have spent countless hours deleting spam comments, time that could have been spent much more efficiently.  Darren Rowse <a href="http://www.problogger.net/archives/2007/10/08/the-blog-tool-that-has-saved-me-months-of-work/">says</a> Akismet has saved him 46 days of work!</p>
<h2>2. Subscribe to Comments</h2>
<p>I remember the days before this plugin.  If you commented on a blog, there was no way of knowing when someone replied to you, outside of hitting refresh all day or subscribing to the comment RSS feed.  But when <a href="http://txfx.net/code/wordpress/subscribe-to-comments/">Subscribe to Comments</a> was released, all of that changed.  Now visitors could continue the conversation for days, no problem.  I even have comment threads months old that are still somewhat active, all because of this plugin.</p>
<h2>3. Google Sitemap Generator</h2>
<p>I won&#8217;t go into too much detail on this post (I have a WordPress and SEO series planned for the near future), but suffice it to say that <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/">this plugin</a> gets your site indexed by Google in no time.  And you definitely want to be indexed by Google.</p>
<h2>4. Absolute Comments</h2>
<p>Lorelle made a great point about how unnecessarily difficult it is for the blog author to respond to comments, in her session at WordCamp Dallas, and she is right on the money.  <a href="http://planetozh.com/blog/my-projects/absolute-comments-manager-instant-reply/">Absolute Comments</a> lets you reply to comments from the Comment Management screen in the WordPress Admin panel.  It&#8217;s a time saving Godsend! (now 2.5 compatible)</p>
<h2>5. Admin Drop-Down Menu</h2>
<p>If you hate, like I do, the fact that you had to click on a top-level link to get its sublinks in the WordPress Admin, then <a href="http://planetozh.com/blog/my-projects/wordpress-admin-menu-drop-down-css/">this plugin</a> will be your best friend.  It uses simple suckerfish dropdowns to display subnav links in the Admin UI for WordPress.  It&#8217;s hard to explain, but believe me, it is worth your while to download and install this plugin. (now 2.5 compatible)</p>
<h2>6. Feedburner Feedsmith</h2>
<p>If you care anything about stats, you&#8217;ll want to be using Feedburner to track your feed subscription numbers.  But in order to get an accurate count, you need to be forwarding all of your feeds to your feedburner account. <a href="http://www.google.com/support/feedburner/bin/answer.py?answer=78483&#038;topic=13252">Feedsmith</a> does this for you.  If anyone visits your site and finds their way to your WordPress generated feed url, it will automatically be forwarded to your Feedburner address.  Genious!</p>
<h2>7. cforms II</h2>
<p>THE MOST FLEXIBLE <a href="http://www.deliciousdays.com/cforms-plugin">contact form plugin</a> available.  I don&#8217;t much like the included styles, but the features make up for that 5 times over.  Add fields, delete fields, multiple forms, too many features to name.  This is the only contact form plugin you&#8217;ll ever need.<br />
(if cforms II is too complicated for you, the <a href="http://green-beast.com/blog/?page_id=136">Secure and Accessible PHP Contact Form</a> is a nice, more simple alternative).</p>
<p>With these 7 plugins, my blogs are optimized just the way I want them.  Do you have any plugins that you can&#8217;t live without?  Do you have a list of plugins you install every time you create a new WordPress site?  Let me know which plugins you think are indispensable in the comments below!</p>
<p>(<a href="http://www.flickr.com/photos/ppdigital/2058130092/">feature photo</a>)</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/themes/elegantblue/' rel='bookmark' title='Permanent Link: ElegantBlue Theme Released!'>ElegantBlue Theme Released!</a></li>
<li><a href='http://www.nathanrice.net/themes/stripped/' rel='bookmark' title='Permanent Link: Stripped Theme Released'>Stripped Theme Released</a></li>
<li><a href='http://www.nathanrice.net/themes/rockinbizred/' rel='bookmark' title='Permanent Link: RockinBizRed Updated to 2.0'>RockinBizRed Updated to 2.0</a></li>
<li><a href='http://www.nathanrice.net/blog/the-problem-with-theme-options/' rel='bookmark' title='Permanent Link: The Problem With &#8220;Theme Options&#8221;'>The Problem With &#8220;Theme Options&#8221;</a></li>
<li><a href='http://www.nathanrice.net/blog/3-new-plugins-by-yours-truly/' rel='bookmark' title='Permanent Link: 3 New Plugins by Yours Truly'>3 New Plugins by Yours Truly</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/7-must-have-plugins/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Comment Link in single.php</title>
		<link>http://www.nathanrice.net/blog/comment-link-in-singlephp/</link>
		<comments>http://www.nathanrice.net/blog/comment-link-in-singlephp/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 04:20:36 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Planet WordPress]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[WordPress Tricks]]></category>
		<category><![CDATA[comment link]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[post view]]></category>
		<category><![CDATA[single post]]></category>
		<category><![CDATA[single.php]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/blog/comment-link-in-singlephp/</guid>
		<description><![CDATA[Ever noticed that the comments_popup_link function doesn&#8217;t actually output anything when viewing a single post?
I have &#8230; and until recently, I ended up just not including a link to the &#8220;comments&#8221; of a post when viewing a single post, and just hoping that either 1) no one noticed, or 2) no one would care, assuming [...]]]></description>
			<content:encoded><![CDATA[<p>Ever noticed that the <a href="http://codex.wordpress.org/Template_Tags/comments_popup_link">comments_popup_link</a> function doesn&#8217;t actually output anything when viewing a single post?</p>
<p><strong>I have</strong> &#8230; and until recently, I ended up just not including a link to the &#8220;comments&#8221; of a post when viewing a single post, and just hoping that either <strong>1)</strong> no one noticed, or <strong>2)</strong> no one would care, assuming they would just scroll down to the bottom of the post to see the number of comments.</p>
<p>But, I don&#8217;t like to assume.  I like to think of the user as a person &#8230; a person that has normal expectations when using a theme.</p>
<p>Therefore, I decided to figure out a way (I&#8217;m sure I&#8217;m not the only one) to keep that darn link working &#8230; even when viewing a single post.<span id="more-50"></span></p>
<p>So, let&#8217;s assume that you have some variation of the following code in the index.php/home.php file of your WordPress theme:</p>
<pre lang="php">&lt;?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?&gt;</pre>
<p>This is the quick and dirty way of handling the link to the comments section of a single post.  But, like I said, when viewing a single post, this doesn&#8217;t output anything.  So, replace that code up there with the following:</p>
<pre lang="php">
&lt;a href="&lt;?php the_permalink(); ?&gt;#comments"&gt;&lt;?php comments_number('No Comments', '1 Comment', '% Comments'); ?&gt;&lt;/a&gt;
</pre>
<p>I found this after noticing that the particular comments.php file I use displayed the number of comments in the header of the comments section by using the <a href="http://codex.wordpress.org/Template_Tags/comments_number">comments_number</a> function.  Bingo!  That&#8217;s all I needed!  Once you&#8217;ve found a function that will output the number of comments, it&#8217;s just a matter of formulating a link to the posts permalink followed by the section anchor (#section).</p>
<p>And now, you&#8217;ve fabricated the same output as <a href="http://codex.wordpress.org/Template_Tags/comments_popup_link">comments_popup_link</a> manually (with a little dynamic help).</p>
<p>Hope that helps!!!</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/wordpress-single-post-templates/' rel='bookmark' title='Permanent Link: WordPress Single Post Templates'>WordPress Single Post Templates</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Optimized Titles'>Ultimate Guide to WordPress SEO &#8211; Optimized Titles</a></li>
<li><a href='http://www.nathanrice.net/blog/wordpress-2-8-and-the-body_class-function/' rel='bookmark' title='Permanent Link: WordPress 2.8 and the body_class() Function'>WordPress 2.8 and the body_class() Function</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-google-sitemaps/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Google Sitemaps'>Ultimate Guide to WordPress SEO &#8211; Google Sitemaps</a></li>
<li><a href='http://www.nathanrice.net/blog/an-introduction-to-wordpress-action-hooks/' rel='bookmark' title='Permanent Link: An Introduction to WordPress Action Hooks'>An Introduction to WordPress Action Hooks</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/comment-link-in-singlephp/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>PageRank, Technorati, and Free WordPress Themes</title>
		<link>http://www.nathanrice.net/blog/pagerank-technorati-and-free-wordpress-themes/</link>
		<comments>http://www.nathanrice.net/blog/pagerank-technorati-and-free-wordpress-themes/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 15:08:13 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WordPress Tips]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/blog/pagerank-technorati-and-free-wordpress-themes/</guid>
		<description><![CDATA[OK, first of all I want to preface this by saying that I have never, and will never try to game any ranking system.  OOO &#8212; take that back, I did include sponsored links in some of my first free WordPress themes, but other than that, I&#8217;ve never tried to game a ranking engine. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.nathanrice.net/wp-content/uploads/2007/10/2links.jpg" style="padding: 0px 8px 3px 0px; float: left" alt="2 Links" />OK, first of all I want to preface this by saying that I have never, and will never try to game any ranking system.  OOO &#8212; take that back, I did include sponsored links in some of my first <a href="http://www.nathanrice.net/themes/">free WordPress themes</a>, but other than that, I&#8217;ve never tried to game a ranking engine.  AND, I would never recommend you doing so either.</p>
<p>However, one of the very fortunate side effects of releasing <a href="http://www.nathanrice.net/themes/">free WordPress themes</a> is that you get a killer amount of backlinks for your trouble.</p>
<p>And to be honest, I don&#8217;t really mind recognizing, and leveraging that fact to my benefit.</p>
<h2>Always include two links in the footer</h2>
<p>That&#8217;s right, as of right now, there is no blowback for including a link to the support page of the theme, along with your name as the author.  This means<span id="more-35"></span> that not only are you getting steady backlinks to the individual theme, but also backlinks to your homepage.</p>
<p>What is that so important?</p>
<p>OK, let&#8217;s say you&#8217;ve released 5 free themes.  Each one of those themes contains a link to the support page for that theme.  Let&#8217;s also say that you get an average of 200 backlinks per theme released.</p>
<p>Would you rather have 200 links to 5 different pages on your site, or 1000 links back to your homepage?</p>
<p>I&#8217;d personally rather have the latter.  Why?  The more backlinks to a single page, the higher that page&#8217;s PageRank will be.  And the higher your pagerank, the more value Google places on your links, thus making your homepage a powerful and influential player in the keywork arena, and making your site much more valuable.</p>
<p>Yeah, it&#8217;s minor and a bit petty, but by including two links in the footer, you really do give yourself a distinct advantage on the web.</p>
<p>However, the second this becomes a no-no in the WordPress community, you should stop doing it.  Just like with the sponsored theme controversy, you don&#8217;t want to be on the wrong side of the fence if it becomes an issue.  A single link is better than no traffic at all.</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/ranking-high-by-leveraging-the-power-of-pagerank/' rel='bookmark' title='Permanent Link: Ranking High by Leveraging the Power of PageRank'>Ranking High by Leveraging the Power of PageRank</a></li>
<li><a href='http://www.nathanrice.net/blog/google-pagerank-updated/' rel='bookmark' title='Permanent Link: Google PageRank Updated'>Google PageRank Updated</a></li>
<li><a href='http://www.nathanrice.net/blog/community-self-respect-and-free-wordpress-themes/' rel='bookmark' title='Permanent Link: Community, Self-Respect, and Free WordPress Themes'>Community, Self-Respect, and Free WordPress Themes</a></li>
<li><a href='http://www.nathanrice.net/blog/premium-wordpress-themes/' rel='bookmark' title='Permanent Link: Premium WordPress Themes?'>Premium WordPress Themes?</a></li>
<li><a href='http://www.nathanrice.net/blog/final-word-on-wordpress-themes-and-the-gpl/' rel='bookmark' title='Permanent Link: Final Word on WordPress Themes and the GPL?'>Final Word on WordPress Themes and the GPL?</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/pagerank-technorati-and-free-wordpress-themes/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>WordPress 2.3 Theme Backward Compatibility</title>
		<link>http://www.nathanrice.net/blog/wordpress-23-theme-backward-compatibility/</link>
		<comments>http://www.nathanrice.net/blog/wordpress-23-theme-backward-compatibility/#comments</comments>
		<pubDate>Mon, 24 Sep 2007 21:48:20 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[WordPress Tricks]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/blog/wordpress-23-theme-backward-compatibility/</guid>
		<description><![CDATA[Over at BlogginPro, the question was posed:
My biggest question is “what will happen if we take the newly updated theme, and place it on a blog running a previous version of WordPress?”
Is there some way to check which version of WordPress is being run, or will we have to put out a WordPress 2.3 only [...]]]></description>
			<content:encoded><![CDATA[<p>Over at <a href="http://www.bloggingpro.com/archives/2007/09/17/adding-wordpress-23-tags-to-a-theme/">BlogginPro</a>, the question was posed:</p>
<blockquote><p>My biggest question is “what will happen if we take the newly updated theme, and place it on a blog running a previous version of WordPress?”</p>
<p>Is there some way to check which version of WordPress is being run, or will we have to put out a WordPress 2.3 only version of each and every theme?</p></blockquote>
<p>I&#8217;m not normally an active commenter on blogs, but since I knew the answer to the question, I figured I&#8217;d speak up and answer the question.  Because of this, I figured I&#8217;d go ahead and answer it here as well.</p>
<p>PHP comes with the built in capability to check to see if a <a href="http://www.php.net/function_exists">function exists</a>.  Since template tags are nothing more than PHP functions, it makes sense that you can very easily use the <a href="http://www.php.net/function_exists">function_exists</a> condition to check the availability of the function before actually calling it.  It would go a little something like this:<span id="more-25"></span></p>
<p><code>&lt;?php if ( function_exists('the_tags') ) { </code><br />
<code>the_tags('Tags:', ', ', '');  } ?&gt;</code></p>
<p>So now, you have added the ability to add tags to your theme, without breaking it in all versions prior to 2.3.</p>
<h2>Bonus Tip</h2>
<p>OK, I have to admit that I haven&#8217;t actually done this for my themes, but I wanted to throw this out there as a possibility.  If you&#8217;ve been developing themes for a while now, you&#8217;ve got to be aware of tags that have been <a href="http://www.wordpressthemes.com/blog/wordpress-deprecated-tags.htm">deprecated</a>.  For instance, let&#8217;s say you wanted to list your categories in the sidebar.  Normally, you would use <a href="http://codex.wordpress.org/Template_Tags/wp_list_categories">the wp_list_categories</a> function.</p>
<p>But if you wanted to be backward compatible, you would use the deprecated tag (<a href="http://codex.wordpress.org/Template_Tags/wp_list_cats">wp_list_cats</a>) instead of the new one.  That way, you make sure you have a catch-all function (since WordPress doesn&#8217;t remove deprecated functions from the code for quite a while).</p>
<p>In reality, you&#8217;re using an inferior function, even if the user has a fully upgraded version of WordPress.</p>
<p>It would be better if you used the function check to make sure your theme is truly, fully backward compatible.  That means that even after WordPress phases out the deprecated function, your theme still works.</p>
<p>This also eliminates the need to release different themes for different versions of WordPress.  A single theme will work universally!  Here&#8217;s a sample of how you would do it:</p>
<p><code>&lt;?php if ( function_exists('wp_list_categories') ) { //if the new function exists</code><br />
<code>wp_list_categories();  } else { </code><br />
<code>wp_list_cats(); } ?&gt;</code></p>
<p>Easy as cake!  Enjoy your new, fully backward compatible theme!</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/is-my-theme-27-compatible/' rel='bookmark' title='Permanent Link: Is My Theme 2.7 Compatible?'>Is My Theme 2.7 Compatible?</a></li>
<li><a href='http://www.nathanrice.net/blog/wordpress-223-released/' rel='bookmark' title='Permanent Link: WordPress 2.2.3 Released!'>WordPress 2.2.3 Released!</a></li>
<li><a href='http://www.nathanrice.net/blog/what-do-you-want-to-know-about-wordpress/' rel='bookmark' title='Permanent Link: What Do You Want to Know About WordPress?'>What Do You Want to Know About WordPress?</a></li>
<li><a href='http://www.nathanrice.net/blog/wordpress-theme-viewer-still-crippled/' rel='bookmark' title='Permanent Link: WordPress Theme Viewer &#8212; Still Crippled'>WordPress Theme Viewer &#8212; Still Crippled</a></li>
<li><a href='http://www.nathanrice.net/blog/the-overlooked-tag-tags/' rel='bookmark' title='Permanent Link: The Overlooked &#8220;Tag&#8221; Tags'>The Overlooked &#8220;Tag&#8221; Tags</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/wordpress-23-theme-backward-compatibility/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>The Overlooked &#8220;Tag&#8221; Tags</title>
		<link>http://www.nathanrice.net/blog/the-overlooked-tag-tags/</link>
		<comments>http://www.nathanrice.net/blog/the-overlooked-tag-tags/#comments</comments>
		<pubDate>Mon, 24 Sep 2007 18:37:39 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WordPress Tips]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/blog/the-overlooked-tag-tags/</guid>
		<description><![CDATA[OK, I admit being a sucker for all the &#8220;tag hype&#8221; in the WordPress Community too.  I&#8217;ve seen all the WordPress bloggers (that is, bloggers who specialize in WordPress tips) try to be the first to write a tutorial on how to implement tagging in your WordPress theme. I&#8217;ve even been tempted to do [...]]]></description>
			<content:encoded><![CDATA[<p>OK, I admit being a sucker for all the &#8220;tag hype&#8221; in the WordPress Community too.  I&#8217;ve seen all the WordPress bloggers (that is, bloggers who specialize in WordPress tips) try to be the <a href="http://feeds.b5media.com/~r/b5media/Technosailor/~3/158978758/">first</a> to write a <a href="http://weblogtoolscollection.com/archives/2007/09/19/tagging-plugins-for-wordpress-23/">tutorial</a> on how to <a href="http://richgilchrest.com/how-to-add-wordpress-23-tags-to-your-current-theme/">implement tagging</a> in your <a href="http://www.nathanrice.net/themes/">WordPress theme</a>. I&#8217;ve even been tempted to do it myself, although I&#8217;ve resisted.</p>
<p><strong>And I subscribe to a good many blogs that specialize in this kind of information too.</strong></p>
<p>And as I&#8217;ve been following these blogs, I&#8217;ve been waiting on one, <strong>JUST ONE</strong>, to mention the 2 template tags for &#8220;tags&#8221; that I noticed in the Default theme that came with my <a href="http://codex.wordpress.org/Version_2.3">WordPress 2.3</a> beta download.  Seriously, I&#8217;ve been waiting to see how long it would take for someone to realize that no one has written on them yet and capitalize on it.  But as of yet, no one has (at least that I have seen).  So, I decided to take a few minutes and let everyone know about two overlooked template/conditional tags that are available for the new version of WordPress:<span id="more-24"></span></p>
<h2>Conditional Tag: is_tag()</h2>
<p>I&#8217;m not sure if everyone is familiar with <a href="http://codex.wordpress.org/Conditional_Tags">conditional tags</a>.  If not, they&#8217;re basically a way for you to insert some conditional code to display some kind of information only if the condition is met.  For instance, let&#8217;s say you wanted to display a huge yellow duck in your sidebar when a person is on your about page.  Just use the conditional tag if (is_page(&#8216;about&#8217;)) and then put in the code to display the duck.  For more on conditional tags, <a href="http://codex.wordpress.org/Conditional_Tags">check this out</a>.</p>
<p>So the <strong>is_tag</strong> conditional tag can be used in many different ways, but the one instance in which I found it used was in the archive.php page, where the condition went like this: <strong>If this is a tag archive, then display the tag title in the header.</strong></p>
<p>Which brings me to overlooked template tag number 2:</p>
<h2>Template tag: single_tag_title()</h2>
<p>What&#8217;s odd about this is that it isn&#8217;t even listed in the official <a href="http://codex.wordpress.org/Template_Tags">WordPress template tag directory</a>!!!  However, I did find it being used in the Default theme that came with 2.3 as well.</p>
<p><strong>Where can I use this tag?</strong></p>
<p>Again, the archive.php page is where I found it, and that&#8217;s the best place for it to be used.  When listing a tag archive, you can use the <strong>single_tag_title()</strong> to display the tag title as the header of the page.</p>
<p>OK, so neither of these are really as important as <a href="http://www.wpdesigner.com/2007/08/28/wordpress-23-beta-1-review-and-checklist/">the_tags</a> or <a href="http://codex.wordpress.org/Template_Tags/wp_tag_cloud">wp_tag_cloud</a>, but it was still disappointing to see them being overlooked.</p>
<p>So get out there are start updating your themes for the new tagging system!  And don&#8217;t forget the oft&#8217; overlooked tags I talked about today, either!</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-heading-tags/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Optimized Heading Tags'>Ultimate Guide to WordPress SEO &#8211; Optimized Heading Tags</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-optimized-titles/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; Optimized Titles'>Ultimate Guide to WordPress SEO &#8211; Optimized Titles</a></li>
<li><a href='http://www.nathanrice.net/blog/3-ways-to-optimize-your-blog-homepage/' rel='bookmark' title='Permanent Link: 3 Ways to Optimize Your Blog Homepage'>3 Ways to Optimize Your Blog Homepage</a></li>
<li><a href='http://www.nathanrice.net/blog/my-thoughts-on-the-centralization-of-wordpress-content/' rel='bookmark' title='Permanent Link: Centralization of WordPress Content'>Centralization of WordPress Content</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-keywords/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Keywords'>Ultimate Guide to WordPress SEO &#8211; META Keywords</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/the-overlooked-tag-tags/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress Quick Tip: Turn off Smileys</title>
		<link>http://www.nathanrice.net/blog/wordpress-quick-tip-turn-off-smileys/</link>
		<comments>http://www.nathanrice.net/blog/wordpress-quick-tip-turn-off-smileys/#comments</comments>
		<pubDate>Sun, 16 Sep 2007 18:19:16 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WordPress Tips]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/blog/wordpress-quick-tip-turn-off-smileys/</guid>
		<description><![CDATA[This is just a very quick tip for your WordPress blog.  One of the most annoying things about WordPress&#8217;s default settings is the fact that smileys are turned on by default.  What&#8217;s a smiley, you say?  When you put characters together like a colon and an closing parenthesis, WordPress replaces the text [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.nathanrice.net/wp-content/uploads/2007/09/smileys.jpg" alt="Smiley Faces" style="padding: 0px 10px 10px 0px; float: left" />This is just a very quick tip for your <a href="http://www.wordpress.org/">WordPress</a> blog.  One of the most annoying things about WordPress&#8217;s default settings is the fact that <a href="http://codex.wordpress.org/Using_smilies">smileys</a> are turned on by default.  <strong>What&#8217;s a smiley, you say?</strong>  When you put characters together like a colon and an closing parenthesis, WordPress replaces the text with a little yellow smiley face.  How cute.</p>
<p>The problem is, many times WordPress theme designers put styles in the stylesheet to control any image in the content div that will either float all images or maybe put a border around them.  The result is a screwed up story &#8230; all because of this &#8220;cute&#8221; little feature.</p>
<p>On top of that, let&#8217;s say you wanted to put an actual parenthetical statement in your blog story.  Now imagine that your parenthetical statement ends with the number &#8220;8&#8243;.  You wouldn&#8217;t think that would be a problem &#8230; but if you have smileys turned on, it is a problem.<span id="more-18"></span>  You end up with a super cool picture of a smiley face wearing a pair of sunglasses.  You see, if you put the number &#8220;8&#8243; next to a closing parenthesis, you get that little sunglass sporting smiley face.  Pretty annoying, huh?</p>
<p><strong>So here&#8217;s how to turn them off:</strong></p>
<p>Go to your WordPress admin panel and click on &#8220;Options&#8221; then &#8220;Writing&#8221;.  In the &#8220;Formatting&#8221; section, just uncheck the box that says &#8220;Convert emoticons &#8230; to graphics on display&#8221;.  Once this is unchecked, you won&#8217;t see any more annoying smiley faces.</p>
<p>Whew!   That&#8217;s better :-)</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/definitive-sticky-posts-guide-for-wordpress-27/' rel='bookmark' title='Permanent Link: Definitive Sticky Posts Guide for WordPress 2.7'>Definitive Sticky Posts Guide for WordPress 2.7</a></li>
<li><a href='http://www.nathanrice.net/blog/serve-ie6-visitors-the-default-wordpress-theme/' rel='bookmark' title='Permanent Link: Serve IE6 Visitors the Default WordPress Theme'>Serve IE6 Visitors the Default WordPress Theme</a></li>
<li><a href='http://www.nathanrice.net/blog/3-ways-to-optimize-your-blog-homepage/' rel='bookmark' title='Permanent Link: 3 Ways to Optimize Your Blog Homepage'>3 Ways to Optimize Your Blog Homepage</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-keywords/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Keywords'>Ultimate Guide to WordPress SEO &#8211; META Keywords</a></li>
<li><a href='http://www.nathanrice.net/blog/browser-detection-and-the-body_class-function/' rel='bookmark' title='Permanent Link: Browser Detection and the body_class() Function'>Browser Detection and the body_class() Function</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/wordpress-quick-tip-turn-off-smileys/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>3 Ways to Optimize Your Blog Homepage</title>
		<link>http://www.nathanrice.net/blog/3-ways-to-optimize-your-blog-homepage/</link>
		<comments>http://www.nathanrice.net/blog/3-ways-to-optimize-your-blog-homepage/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 22:58:38 +0000</pubDate>
		<dc:creator>Nathan Rice</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[WordPress Tricks]]></category>

		<guid isPermaLink="false">http://www.nathanrice.net/blog/3-ways-to-optimize-your-blog-homepage/</guid>
		<description><![CDATA[Back when I wrote &#8220;Good Design Starts with the Homepage&#8221;, I didn&#8217;t include much in the way of tips for actually achieving that perfect homepage.  The fact is, there is an endless list of possibilities to optimizing your blog&#8217;s homepage, but I believe that if you do these 3 simple things, you&#8217;ll be on [...]]]></description>
			<content:encoded><![CDATA[<p>Back when I wrote &#8220;Good Design Starts with the Homepage&#8221;, I didn&#8217;t include much in the way of tips for actually achieving that perfect homepage.  The fact is, there is an endless list of possibilities to optimizing your blog&#8217;s homepage, but I believe that <strong>if you do these 3 simple things, you&#8217;ll be on your way to the perfect homepage!<br />
</strong><br />
(disclaimer: all the below tips pertain to <a href="http://www.wordpress.org/">WordPress</a> blogs.  Sorry guys, I&#8217;m a WordPress fanboy.)</p>
<h2>1. Use the correct header tags</h2>
<p>One of the most common semantic mistakes made by blog designers (at one time, myself included) is using the wrong header tag to wrap your titles in.<span id="more-16"></span></p>
<p>For instance, on the homepage, <strong>there should only be one thing wrapped in H1 tags &#8230; your blog&#8217;s title</strong>.  One could argue that the tagline could also be wrapped in H1 tags, but semantically that&#8217;s not the case.  The title of your blog is the &#8220;main title&#8221; of your homepage.  At BEST, one could argue that the tagline is a sub-heading, and therefore needs to be in H2 tags.</p>
<p>Unfortunately, some designers (again, at one time I made this mistake) actually wrap each post&#8217;s title in H1 tags, thus negating the entire semantic purpose of the H1 tag.</p>
<p><strong>I recommend wrapping the titles of the recent blog posts on your homepage in H3 tags.</strong>  This stands to semantic reason.  It&#8217;s not a page header, and it&#8217;s not a sub-header.  Those titles should be wrapped in nothing higher than H3 tags.</p>
<p><strong>Remember, search engines use the semantics of the markup to determine the content of your homepage.</strong>  By wrapping something in H3 tags, you&#8217;re telling the spiders that this is important content, but it&#8217;s has nothing to do with the &#8220;homepage&#8221; itself.  This is dynamic content that will probably be off this homepage in a week. (a lot can be said by using correct markup).</p>
<p>(Yes, I know that sidebar headers are, by default, wrapped in H2 tags.  While I disagree with this semantically, WordPress wraps the default widget headers in H2 tags, and widget developers have done likewise.  We can&#8217;t really do much about that.)</p>
<h2>2. Only Display the Content of 2 Recent Posts</h2>
<p><a href="http://www.dailybloggingtips.com/">Daniel at DailyBlogginTips.com</a> recently released <a href="http://www.dailyblogtips.com/homepage-excerpts-wordpress-plugin/">a plugin</a> that can handle this for you.  Well, I&#8217;m all for plugins, but I never let a plugin do something for me that I can do myself :-)  If you share that sentiment, then you&#8217;ll appreciate this short, mini-tutorial on how to accomplish the same thing without the use of a plugin :-) (well, almost the same thing).</p>
<p>Whether you use home.php or index.php, it doesn&#8217;t really matter.  Just open up whichever file controls your homepage in you favorite text editor.  I like <a href="http://www.scintilla.org/SciTE.html" title="ScITE">ScITE</a>.</p>
<p>I know that all WordPress theme are different, so all I can realy do is go on the one I use.  In any case, most any WordPress theme index file will follow a similar structure.<br />
<code><br />
&lt;?php if (have_posts()) : ?&gt;<br />
&lt;?php while (have_posts()) : the_post(); ?&gt;<br />
The Post Title<br />
The Content<br />
The meta info (comments, author, categories, etc.)<br />
&lt;?php endwhile; ?&gt;<br />
&lt;?php endif; ?&gt;<br />
</code><br />
It&#8217;s the standard loop &#8230; nothing too special about it.  Now, what would happen if we set a variable at the opening of the loop, and each time it &#8220;looped&#8221; through, we increased the value of that variable by one?  What we would have is an easy way to track the order of the stories on the homepage.  The first story is 1, the second story is 2, and so on&#8230;</p>
<p>Then, we could use a simple if statement to control the output of the loop based on which story is being displayed.  The code would look something like this:</p>
<p><code>&lt;?php if (have_posts()) : ?&gt;<br />
&lt;?php $i = 1; ?&gt;<br />
&lt;?php while (have_posts()) : the_post(); ?&gt;</code></p>
<p><code>&lt;?php if ($i &lt; = 2) { ?&gt;<br />
The Post Title<br />
The Content<br />
The meta info (comments, author, categories, etc.)</code></p>
<p><code>&lt;?php } elseif ($i &gt;= 3) { ?&gt;<br />
The Post Title (maybe in a different header class to make them smaller)<br />
The Excerpt (or you could leave this out altogether)<br />
The meta info (again, you could just leave this out)</code></p>
<p><code>&lt;?php } $i = $i + 1; ?&gt;<br />
&lt;?php endwhile; ?&gt;<br />
&lt;?php endif; ?&gt;</code></p>
<p><strong>Basically, each time it loops through, the counter is increased by 1. Once it has been increased twice, we tell it to display the information differently.</strong>  We can have it display titles only, title and meta, title and the excerpt, whatever you want.</p>
<p><strong>For a sample index.php/home.php file with the code already in place</strong>, just <a href="http://www.nathanrice.net/download/index.txt">download it here</a>.  But seriously, take a look at the code and try to understand it.  It&#8217;s good to be able to do this kind of thing yourself.</p>
<h2>3. Give Blog Goals a Priority Position on your Homepage</h2>
<p>For instance, let&#8217;s say your target is to attract new feed visitors, or maybe it&#8217;s to encourage clicks on <a href="http://www.google.com/adsense/">adsense</a>, or perhaps it&#8217;s earn the most money from your banner or button ads.</p>
<p><strong>The key is to determine the best possible location for these items.</strong></p>
<p>For RSS/Feed subscription buttons, you want to make sure you are using the <a href="http://feedicons.com/">standard icon</a>, and putting it in the top of your left-most sidebar.  Maybe you have 2 right sidebars or a sidebar on either side of the content &#8230; it doesn&#8217;t matter.  <strong>If you want to attract new feed readers, you need to put the subscription options in the top of the sidebar that is furthest to the left</strong> because of the <a href="http://lists.techwr-l.com/pipermail/techwr-l/2006-April/004404.html">F pattern</a>.</p>
<p>The same goes for ads.  I put my <a href="http://feeds.feedburner.com/nathanricenet">RSS options</a> in the top of my left-most column, and offer <a href="http://www.nathanrice.net/advertise/">ad space</a> in the top of the right-most column.  Obviously, you can see the order of importance I place on my site.  Content first, then RSS, then ads.  On my other blog, I place paramount emphasis on RSS subscription options, and below that I have my &#8220;favorite posts&#8221; list.  Those two things reflect my 2 goals for that site &#8230; to increase subscribers and to highlight my best content.</p>
<h2>Bonus tips:</h2>
<p>You know a list of 3 tips couldn&#8217;t just have 3 tips! :-)  Here are a couple more &#8230;</p>
<p><strong>Use &#8220;Next/Previous Page&#8221; instead of &#8220;Older/Newer Posts&#8221;.</strong>  And have them display logically.  For instance, if you take a look at the <a href="http://www.nathanrice.net/themes/rockinbizred/">theme</a> I recently released (<a href="http://demos.nathanrice.net/?wptheme=RockinBizRed">demo page</a>) you&#8217;ll notice at the bottom of the page you&#8217;ll see a link to &#8220;Next Page&#8221; with arrows pointing to the right. You&#8217;ll also notice that the link is aligned to the right of the column.  <strong>THAT&#8217;S HOW IT SHOULD BE!!!</strong> If you go to the next page, you&#8217;ll see a link at the bottom of the page that says &#8220;Previous Page&#8221; with arrows pointing to the left. <strong>THAT&#8217;S HOW IT SHOULD BE!!!</strong>  Navigation should be logical.  I wrote more about the <a href="http://performancing.com/previous-posts-or-next-page">subject here</a>.</p>
<p><strong>Use icons for your meta information.</strong> There are <a href="http://www.famfamfam.com/">tons</a> of <a href="http://el73.be/drunkey-love/downloads/">free</a> <a href="http://www.stylegala.com/features/bulletmadness/">icons</a> out there that you can use on your blog.  They add a pop of color to an otherwise bland page of text.  I think it improves the overall quality of your homepage.</p>
<p>And there you go &#8230; <strike>3 tips</strike> 5 tips on improving your blog&#8217;s homepage design.  I&#8217;ve employed them on my blogs and the results have been overwhelmingly positive.  Try them out and see if they work for you!</p>


<h3>Related posts:</h3><ol><li><a href='http://www.nathanrice.net/blog/good-design-starts-with-the-homepage/' rel='bookmark' title='Permanent Link: Good Design Starts With the Homepage'>Good Design Starts With the Homepage</a></li>
<li><a href='http://www.nathanrice.net/blog/creating-a-blog-page-with-paging/' rel='bookmark' title='Permanent Link: Creating a &#8220;Blog Page&#8221; &#8212; With Paging'>Creating a &#8220;Blog Page&#8221; &#8212; With Paging</a></li>
<li><a href='http://www.nathanrice.net/blog/the-overlooked-tag-tags/' rel='bookmark' title='Permanent Link: The Overlooked &#8220;Tag&#8221; Tags'>The Overlooked &#8220;Tag&#8221; Tags</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-keywords/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Keywords'>Ultimate Guide to WordPress SEO &#8211; META Keywords</a></li>
<li><a href='http://www.nathanrice.net/blog/ultimate-guide-to-wordpress-seo-meta-descriptions/' rel='bookmark' title='Permanent Link: Ultimate Guide to WordPress SEO &#8211; META Descriptions'>Ultimate Guide to WordPress SEO &#8211; META Descriptions</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.nathanrice.net/blog/3-ways-to-optimize-your-blog-homepage/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
	</channel>
</rss>
