<?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>Digitivity &#187; excerpt</title>
	<atom:link href="http://digitivity.org/tag/excerpt/feed" rel="self" type="application/rss+xml" />
	<link>http://digitivity.org</link>
	<description>The Digital Productivity Blog</description>
	<lastBuildDate>Sat, 24 Dec 2011 17:34:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Showing Excerpts Instead of Full Posts on the Home Page in WordPress</title>
		<link>http://digitivity.org/422/showing-excerpts-instead-of-full-posts-on-the-home-page-in-wordpress-vs-single-page</link>
		<comments>http://digitivity.org/422/showing-excerpts-instead-of-full-posts-on-the-home-page-in-wordpress-vs-single-page#comments</comments>
		<pubDate>Tue, 29 Dec 2009 17:46:47 +0000</pubDate>
		<dc:creator>Digitivity</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[excerpt]]></category>
		<category><![CDATA[full post]]></category>
		<category><![CDATA[home page]]></category>
		<category><![CDATA[index.php]]></category>
		<category><![CDATA[single.php]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://digitivity.org/?p=422</guid>
		<description><![CDATA[<p>Posted in <a href="http://digitivity.org/category/blogging" title="Blogging">Blogging</a><a href="http://digitivity.org/category/how-to" title="HowTo">HowTo</a></p>Some of my posts have been getting longer and longer, especially how-to&#8217;s. It&#8217;s hard to scan the front page for articles, and I thought it was time to switch from full posts to excerpts on the home page. Why have excerpts instead of full posts on your home page Some reasons you might want to [...]


Related posts:<ol><li><a href='http://digitivity.org/425/showing-related-posts-in-wordpress-with-the-yarpp-plugin-to-increase-pageviews' rel='bookmark' title='Permanent Link: Showing Related Posts in WordPress with the YARPP Plugin to Increase Pageviews'>Showing Related Posts in WordPress with the YARPP Plugin to Increase Pageviews</a></li>
<li><a href='http://digitivity.org/43/updating-old-posts-or-posting-new-ones' rel='bookmark' title='Permanent Link: Updating Old Posts or Posting New Ones'>Updating Old Posts or Posting New Ones</a></li>
<li><a href='http://digitivity.org/236/making-minor-changes-in-wordpress-without-updating-the-last-updated-date-with-the-minor-edit-plugin' rel='bookmark' title='Permanent Link: Making Minor Changes in WordPress Without Updating the Last-Updated Date with the Minor Edit Plugin'>Making Minor Changes in WordPress Without Updating the Last-Updated Date with the Minor Edit Plugin</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Some of my posts have been getting longer and longer, especially how-to&#8217;s. It&#8217;s hard to scan the front page for articles, and I thought it was time to switch from full posts to excerpts on the home page.</p>
<h2>Why have excerpts instead of full posts on your home page</h2>
<p>Some reasons you might want to show excerpts instead of full posts on the home page include:</p>
<ul>
<li>It can be difficult for readers (new and old) to get a quick overview of your latest articles when they have to page down a couple of times to get to the next article headline.</li>
<li>Search engines don&#8217;t like duplicate content on your website. So it&#8217;s better to have your content on single pages as opposed to both home and single pages.</li>
<li>The fact that a user has to click on an article to read it means that you get feedback on which articles your readers like. If they read the entire article off the front page, you don&#8217;t know if they read the article, or closed their browser immediately after loading your homepage.</li>
</ul>
<h2>Why have full posts instead of excerpts on your home page</h2>
<p>On the other hand,</p>
<ul>
<li>Some people believe the &#8220;no duplicate content&#8221; rule to be overblown.</li>
<li>Having full content on the home page makes it easier for people to read without constant clicking.</li>
<li>Having full content on your home page instead of excerpts means you get full content in your RSS feeds as well, which many of your readers may find handy.</li>
<li>Having full content on your home page means more text which often results in some combination of keywords which can be a match for a user&#8217;s Google query. I don&#8217;t know if that&#8217;s the kind of random traffic you want, though.</li>
</ul>
<h2>Before you switch</h2>
<p>In the end, I decided to go with excerpts because my digital how-to&#8217;s were getting to be longer than 6 pages (i.e., six times pressing the Page Down key in a typical-sized browser window). Having to page down six times just to see what the next article&#8217;s title is seemed to me to be too much to ask readers to do. With excerpts, you can now page down just five times to see all the latest articles.</p>
<p>But before you do anything, be sure to make a full backup of your WordPress installation, including the MySQL database.</p>
<h2>Creating single.php and editing index.php to show excerpts</h2>
<p>OK, the file that WordPress uses to generate the home page is called <tt>index.php</tt>. You can also have a file called <tt>single.php</tt> that generates the &#8220;single pages&#8221; which display a single blog post per page. If you don&#8217;t have a single.php, WordPress uses index.php for double duty.</p>
<p>But since we want the home page to look different from single pages, we have to have a separate single.php. Just copy the index.php file as-is to a new file called single.php.</p>
<p>Now, we have to edit index.php. Do this with a text editor, or from WordPress administration (Appearance: Editor). If you use the WordPress Editor, look for Main Index Template.</p>
<p>Look for text that says <tt>the_content()</tt>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Replace it with:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>That&#8217;s it!</p>
<h2>Click here to read this entry</h2>
<p>OK, but now after reading the excerpt, the reader has to now go back to click your blog post title to actually read your full post.</p>
<p>Let&#8217;s make it easy by adding a link that reads &#8220;Read the rest of this entry&#8221;:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;h3&gt;&lt;a class=&quot;more-link&quot; title=&quot;Read the rest of <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;Read the rest of this entry ...&lt;/a&gt;&lt;/h3&gt;</pre></div></div>

<p>Note that I wrapped the link in h3 tags to make the link larger, more visible, and easier to click. This is what it looks like:</p>
<h3><a class="more-link" title="Read the rest of this entry" href="">Read the rest of this entry &#8230;</a></h3>
<p>Save the file and reload your homepage to verify the changes.</p>
<p>Thanks to <a href="http://www.problogdesign.com/how-to/the-2-methods-of-showing-excerpts/">Pro Blog Design</a> for this excellent tip.</p>
<h2>Excerpts in RSS feeds, and tags, categories, and archive pages</h2>
<p>Note that by making these changes, your RSS feeds, and tags, categories, and archive pages will show excerpts as opposed to full posts.</p>
<p>You can get fancy by coming up with various combinations of having or not having full posts vs. excerpts on the front page, RSS feeds, tag pages, etc. with various other edits or plugins, but that&#8217;s the basics.</p>
<p>You can also show your entire latest post (or latest x number of posts) in full with the rest as excerpts. Again, that&#8217;s for later.</p>
<h2>Default excerpts</h2>
<p>By default, WordPress shows the first 55 words of your article as an excerpt. It also strips all tags and formatting and just shows plain text.</p>
<p>Some people use plugins to show full sentences and not break in the middle of an excerpt.</p>
<p>But I actually prefer the default which does break sentences. Think about it: if your phone conversation gets cut off, don&#8217;t you call back to listen to what the other party was saying? A break in a sentence actually makes me want to click the link just to complete the sentence.</p>
<h2>Excerpt word count</h2>
<p>If you want to check what 55 words amounts to, you can (among other methods), use the wc command in Linux (which is most likely what your web host provider is using). At the command prompt,</p>
<ul>
<li>type <tt>wc -w</tt>:</li>
<li>paste your first paragraph or so right into the command shell</li>
<li>press Enter</li>
<li>press Ctrl+d</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">js<span style="color: #000000; font-weight: bold;">@</span>webhost:~<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #c20cb9; font-weight: bold;">wc</span> <span style="color: #660033;">-w</span></pre></div></div>

<p>wc responds with the word count:</p>

<div class="wp_syntax"><div class="code"><pre class="en" style="font-family:monospace;">Some of my posts have been getting longer and longer, especially how-to's. It's hard to scan the front page for articles, and I thought it was time to switch from full posts to excerpts on the home page.
&nbsp;
Why have excerpts instead of full posts on your home page
&nbsp;
Some reasons you might want to show excerpts instead of full posts on the home page include:
66</pre></div></div>

<p>66 is the word count.</p>
<h2>Resources</h2>
<p><a href="http://lorelle.wordpress.com/2006/07/19/display-post-excerpts-only-in-wordpress/">Display Post Excerpts Only in WordPress</a></p>
<p><a href="http://codex.wordpress.org/Template_Tags/the_excerpt">Template Tags/the excerpt « WordPress Codex</a></p>


<p>Related posts:<ol><li><a href='http://digitivity.org/425/showing-related-posts-in-wordpress-with-the-yarpp-plugin-to-increase-pageviews' rel='bookmark' title='Permanent Link: Showing Related Posts in WordPress with the YARPP Plugin to Increase Pageviews'>Showing Related Posts in WordPress with the YARPP Plugin to Increase Pageviews</a></li>
<li><a href='http://digitivity.org/43/updating-old-posts-or-posting-new-ones' rel='bookmark' title='Permanent Link: Updating Old Posts or Posting New Ones'>Updating Old Posts or Posting New Ones</a></li>
<li><a href='http://digitivity.org/236/making-minor-changes-in-wordpress-without-updating-the-last-updated-date-with-the-minor-edit-plugin' rel='bookmark' title='Permanent Link: Making Minor Changes in WordPress Without Updating the Last-Updated Date with the Minor Edit Plugin'>Making Minor Changes in WordPress Without Updating the Last-Updated Date with the Minor Edit Plugin</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://digitivity.org/422/showing-excerpts-instead-of-full-posts-on-the-home-page-in-wordpress-vs-single-page/feed</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: digitivity.org @ 2012-02-08 08:24:48 -->
