<?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>DeveloWare LLC &#187; Summarize multiple posts</title>
	<atom:link href="http://www.develoware.com/newsposts/category/wordpress-help/summarize-multiple-posts/feed" rel="self" type="application/rss+xml" />
	<link>http://www.develoware.com</link>
	<description>Websites, Internet Development, Enterprise Web Applications</description>
	<lastBuildDate>Tue, 31 Jan 2012 19:54:35 +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>How to shorthen your wordpress posts into summaries</title>
		<link>http://www.develoware.com/newsposts/how-to-shorthen-your-wordpress-posts-into-summaries-on-home-page/364.php</link>
		<comments>http://www.develoware.com/newsposts/how-to-shorthen-your-wordpress-posts-into-summaries-on-home-page/364.php#comments</comments>
		<pubDate>Fri, 02 Apr 2010 00:35:12 +0000</pubDate>
		<dc:creator>Joseph Mas</dc:creator>
				<category><![CDATA[Summarize multiple posts]]></category>
		<category><![CDATA[WordPress Help]]></category>

		<guid isPermaLink="false">http://www.develoware.com/?p=364</guid>
		<description><![CDATA[Here is a short fix to summarize your blog posts into the first five sentences&#160;on your WordPress blog pages. It is quite simple. I am sure there is other ways to do this but I just needed a quick fix. This fix&#160;will only take a couple minutes.
I just needed a quick fix for a site [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a short fix to summarize your blog posts into the first five sentences&nbsp;on your WordPress blog pages. It is quite simple. I am sure there is other ways to do this but I just needed a quick fix. This fix&nbsp;will only take a couple minutes.</p>
<p>I just needed a quick fix for a site I was working on. The posts were long so before the fix, if you have 5-10 posts you have to scroll way down the page. We just needed a summary of like the first 5 sentences of each posting.</p>
<p>You can see it in action here: <br />
	<a href="http://www.procollectionjobs.com/arm-industry-news/category/credit-collections-finance-and-risk/">http://www.procollectionjobs.com/arm-industry-news/category/credit-collections-finance-and-risk/</a></p>
<p>After searching for a plugin I did find a couple of them but they did not work with the latest release or my theme. Therefore, I whipped this little fix up.</p>
<p>Are you ready? Heres how I did it:</p>
<p>First, open &quot;/wp-includes/post-template.php&quot; and add the following&nbsp;function to the file:</p>
<p><span style="color: #0000cd">//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p><span style="color: #0000cd">function the_content_shortened($more_link_text = null, $stripteaser = 0) {</span></p>
<p><span style="color: #0000cd">&nbsp;$num_of_sentences_post_to_display = 5;<br />
	&nbsp;$content = get_the_content($more_link_text, $stripteaser);<br />
	&nbsp;$content = apply_filters(&#39;the_content&#39;, $content);<br />
	&nbsp;$content = str_replace(&#39;]]&gt;&#39;, &#39;]]&amp;gt;&#39;, $content);</span></p>
<p><span style="color: #0000cd">&nbsp;$contentARR = explode(&quot;.&quot;,$content);</span></p>
<p><span style="color: #0000cd">&nbsp;$shortened_content = &quot;&quot;;<br />
	&nbsp;for($i=0;$i&lt;$num_of_sentences_post_to_display;$i++)<br />
	&nbsp;{<br />
	&nbsp;&nbsp; $shortened_content .= $contentARR[$i].&quot;. &quot;;<br />
	&nbsp;}<br />
	&nbsp;$shortened_content = force_balance_tags($shortened_content . &quot; &#8230;&quot;);<br />
	&nbsp;echo $shortened_content;<br />
	&nbsp;echo &#39;(&lt;a href=&quot;&#39; . get_permalink() . &quot;\&quot;#more-$id\&quot; class=\&quot;more-link\&quot;&gt;Read full news article&lt;/a&gt;)&quot;;<br />
	}</span></p>
<p><span style="color: #0000cd">//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p>Next, find and open the following file: <br />
	What ever your theme is replace &quot;yourtheme&quot; below with your theme.</p>
<p>/wp-content/themes/yourtheme/index.php</p>
<p>
	Now, in the file replace this line (yours might be slightly different but &quot;the_content&quot; function is what we are replacing, just look for it):</p>
<p>	<span style="color: #f00">&lt;?php the_content(&#39;&lt;span&gt;Read the rest of this entry&#8230;&lt;/span&gt;&#39;); ?&gt;</span><br />
	with this:<br />
	<span style="color: #0000cd">&lt;?php the_content_shortened(&#39;&lt;span&gt;Read the rest of this entry&#8230;&lt;/span&gt;&#39;); ?&gt;</span></p>
<p>Save your work and WAAAAA&#8230;&#8230; BAMMM! thats it. All done.</p>
<p>Note: you may want to apply the fix to these other pages also as they usualy show multiple posts like your home page.</p>
<p>Here are the most common files that you would be interested in: <br />
	/wp-content/themes/yourtheme/index.php<br />
	/wp-content/themes/yourtheme/archive.php<br />
	/wp-content/themes/yourtheme/archives.php<br />
	/wp-content/themes/yourtheme/search.php<br />
	/wp-content/themes/yourtheme/page.php</p>
<p>
	Let me know if this helps you. <br />
	Joe</p>
]]></content:encoded>
			<wfw:commentRss>http://www.develoware.com/newsposts/how-to-shorthen-your-wordpress-posts-into-summaries-on-home-page/364.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

