<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	>
<channel>
	<title>Comments on: Quick Tip #8 - Limit the length of &#8216;the_excerpt&#8217; in WordPress</title>
	<atom:link href="http://www.nouveller.com/quick-tips/quick-tip-8-limit-the-length-of-the_excerpt-in-wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nouveller.com/quick-tips/quick-tip-8-limit-the-length-of-the_excerpt-in-wordpress/</link>
	<description>web design &#124; blog &#124; madness</description>
	<pubDate>Thu, 09 Feb 2012 14:49:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Hardik Chauhan</title>
		<link>http://www.nouveller.com/quick-tips/quick-tip-8-limit-the-length-of-the_excerpt-in-wordpress/comment-page-1/#comment-9661</link>
		<dc:creator>Hardik Chauhan</dc:creator>
		<pubDate>Tue, 07 Feb 2012 10:21:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.nouveller.com/?p=1754#comment-9661</guid>
		<description>You can also used the substr function...
e.g.</description>
		<content:encoded><![CDATA[<p>You can also used the substr function&#8230;<br />
e.g.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hardik Chauhan</title>
		<link>http://www.nouveller.com/quick-tips/quick-tip-8-limit-the-length-of-the_excerpt-in-wordpress/comment-page-1/#comment-9660</link>
		<dc:creator>Hardik Chauhan</dc:creator>
		<pubDate>Tue, 07 Feb 2012 10:19:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.nouveller.com/?p=1754#comment-9660</guid>
		<description>Nice logic really awesome...</description>
		<content:encoded><![CDATA[<p>Nice logic really awesome&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: social crm&#124;free social crm tools&#124;social crm tools&#124;social media&#124;social crm software&#124;social crm companies&#124;social crm market size&#124;social crm market&#124;social crm wiki&#124;social crm nyc&#124;social networking crm&#124;social crm definition&#124;collective intellect social media c</title>
		<link>http://www.nouveller.com/quick-tips/quick-tip-8-limit-the-length-of-the_excerpt-in-wordpress/comment-page-1/#comment-9568</link>
		<dc:creator>social crm&#124;free social crm tools&#124;social crm tools&#124;social media&#124;social crm software&#124;social crm companies&#124;social crm market size&#124;social crm market&#124;social crm wiki&#124;social crm nyc&#124;social networking crm&#124;social crm definition&#124;collective intellect social media c</dc:creator>
		<pubDate>Sat, 14 Jan 2012 05:19:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.nouveller.com/?p=1754#comment-9568</guid>
		<description>&lt;strong&gt;social crm&#124;free social crm tools&#124;social crm tools&#124;social media&#124;social crm software&#124;social crm companies&#124;social crm market size&#124;social crm market&#124;social crm wiki&#124;social crm nyc&#124;social networking crm&#124;social crm definition&#124;collective intellect social me...&lt;/strong&gt;

[...]Quick Tip #8 - Limit the length of &#8216;the_excerpt&#8217; in WordPress &#124; Nouveller[...]...</description>
		<content:encoded><![CDATA[<p><strong>social crm|free social crm tools|social crm tools|social media|social crm software|social crm companies|social crm market size|social crm market|social crm wiki|social crm nyc|social networking crm|social crm definition|collective intellect social me&#8230;</strong></p>
<p>[...]Quick Tip #8 - Limit the length of &#8216;the_excerpt&#8217; in WordPress | Nouveller[...]&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gab</title>
		<link>http://www.nouveller.com/quick-tips/quick-tip-8-limit-the-length-of-the_excerpt-in-wordpress/comment-page-1/#comment-9564</link>
		<dc:creator>Gab</dc:creator>
		<pubDate>Thu, 12 Jan 2012 20:25:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.nouveller.com/?p=1754#comment-9564</guid>
		<description>This is very nice, thanks a lot.
Been looking around for another way to reduce the excerpt length without using the wordpress filter (due to using the_title and the_ excerpt inline, using the WP filter still keeps a line break after the_title...) 
this works perfectly ;)
thanks again.</description>
		<content:encoded><![CDATA[<p>This is very nice, thanks a lot.<br />
Been looking around for another way to reduce the excerpt length without using the wordpress filter (due to using the_title and the_ excerpt inline, using the WP filter still keeps a line break after the_title&#8230;)<br />
this works perfectly <img src='http://www.nouveller.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: empresa de reformas Barcelona</title>
		<link>http://www.nouveller.com/quick-tips/quick-tip-8-limit-the-length-of-the_excerpt-in-wordpress/comment-page-1/#comment-9550</link>
		<dc:creator>empresa de reformas Barcelona</dc:creator>
		<pubDate>Thu, 05 Jan 2012 07:15:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.nouveller.com/?p=1754#comment-9550</guid>
		<description>You can certainly see your skills within the work you write. The world hopes for more passionate writers such as you who are not afraid to mention how they believe. At all times follow your heart.</description>
		<content:encoded><![CDATA[<p>You can certainly see your skills within the work you write. The world hopes for more passionate writers such as you who are not afraid to mention how they believe. At all times follow your heart.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pancho</title>
		<link>http://www.nouveller.com/quick-tips/quick-tip-8-limit-the-length-of-the_excerpt-in-wordpress/comment-page-1/#comment-9543</link>
		<dc:creator>Pancho</dc:creator>
		<pubDate>Wed, 04 Jan 2012 14:52:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.nouveller.com/?p=1754#comment-9543</guid>
		<description>Hi,

Great code and it works, but I have a problem. If the content have a italic (&lt;em&gt;&lt;/em&gt;) text at the beging of the text and the closing tag of this text is further than the count limit it show in the theme only the first tag (&lt;em&gt;) and the rest don´t so it´s an open tag afecting all theme design.

Any idea of how to close those tags?

Much thanx and Happy New Year :9</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Great code and it works, but I have a problem. If the content have a italic (<em></em>) text at the beging of the text and the closing tag of this text is further than the count limit it show in the theme only the first tag (<em>) and the rest don´t so it´s an open tag afecting all theme design.</p>
<p>Any idea of how to close those tags?</p>
<p>Much thanx and Happy New Year :9</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: make money  at homeblogging tips</title>
		<link>http://www.nouveller.com/quick-tips/quick-tip-8-limit-the-length-of-the_excerpt-in-wordpress/comment-page-1/#comment-9522</link>
		<dc:creator>make money  at homeblogging tips</dc:creator>
		<pubDate>Tue, 27 Dec 2011 15:30:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.nouveller.com/?p=1754#comment-9522</guid>
		<description>&lt;strong&gt;make money  at homeblogging tips...&lt;/strong&gt;

[...]Quick Tip #8 - Limit the length of &#8216;the_excerpt&#8217; in WordPress &#124; Nouveller[...]...</description>
		<content:encoded><![CDATA[<p><strong>make money  at homeblogging tips&#8230;</strong></p>
<p>[...]Quick Tip #8 - Limit the length of &#8216;the_excerpt&#8217; in WordPress | Nouveller[...]&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Plaidmelon</title>
		<link>http://www.nouveller.com/quick-tips/quick-tip-8-limit-the-length-of-the_excerpt-in-wordpress/comment-page-1/#comment-9504</link>
		<dc:creator>Plaidmelon</dc:creator>
		<pubDate>Mon, 12 Dec 2011 01:37:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.nouveller.com/?p=1754#comment-9504</guid>
		<description>Thanks for the code, I was originally using substr, but I like this method better.

There was some discussion regarding adding the ellipsis(...). I also wanted to add the ellipsis to the end, but got to thinking, what if my excerpt is shorter than the word limit. The ellipsis would be pointless. So I modified the function a bit, and the call to it in the template file. I figured I could let the function do the echo of the excerpt, much the way wordpress' own functions do.

Anyway, thought I'd share.


First, the code for functions.php:


function custom_excerpt($string, $word_limit) {
    $words = explode(' ', $string);

    $count = count($words);
    if ($count &gt; $word_limit) {
        echo (implode(' ', array_slice($words, 0, $word_limit)) . '...');
    }
    else {
        echo implode(' ', array_slice($words, 0, $word_limit));
    }
}


and here's the code for the template file:

if (the_excerpt !== "") {
    custom_excerpt(get_the_excerpt(), '100');
}

else {
    custom_excerpt(the_content, '10');
}</description>
		<content:encoded><![CDATA[<p>Thanks for the code, I was originally using substr, but I like this method better.</p>
<p>There was some discussion regarding adding the ellipsis(&#8230;). I also wanted to add the ellipsis to the end, but got to thinking, what if my excerpt is shorter than the word limit. The ellipsis would be pointless. So I modified the function a bit, and the call to it in the template file. I figured I could let the function do the echo of the excerpt, much the way wordpress&#8217; own functions do.</p>
<p>Anyway, thought I&#8217;d share.</p>
<p>First, the code for functions.php:</p>
<p>function custom_excerpt($string, $word_limit) {<br />
    $words = explode(&#8217; &#8216;, $string);</p>
<p>    $count = count($words);<br />
    if ($count &gt; $word_limit) {<br />
        echo (implode(&#8217; &#8216;, array_slice($words, 0, $word_limit)) . &#8216;&#8230;&#8217;);<br />
    }<br />
    else {<br />
        echo implode(&#8217; &#8216;, array_slice($words, 0, $word_limit));<br />
    }<br />
}</p>
<p>and here&#8217;s the code for the template file:</p>
<p>if (the_excerpt !== &#8220;&#8221;) {<br />
    custom_excerpt(get_the_excerpt(), &#8216;100&#8242;);<br />
}</p>
<p>else {<br />
    custom_excerpt(the_content, &#8216;10&#8242;);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Magdalene Capicotto</title>
		<link>http://www.nouveller.com/quick-tips/quick-tip-8-limit-the-length-of-the_excerpt-in-wordpress/comment-page-1/#comment-9496</link>
		<dc:creator>Magdalene Capicotto</dc:creator>
		<pubDate>Wed, 07 Dec 2011 23:48:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.nouveller.com/?p=1754#comment-9496</guid>
		<description>Oh, I remember those 3d's from back then, on tv and in the cinema once. The glasses itself were already great fun. I don't miss dimension on tv right now, but hey .. might be nice towatch now and then. Those cinema's which give you movies all around you .. I think those more cool. They make me dizzy and such, certain scenes (flying above water and stuff like that).</description>
		<content:encoded><![CDATA[<p>Oh, I remember those 3d&#8217;s from back then, on tv and in the cinema once. The glasses itself were already great fun. I don&#8217;t miss dimension on tv right now, but hey .. might be nice towatch now and then. Those cinema&#8217;s which give you movies all around you .. I think those more cool. They make me dizzy and such, certain scenes (flying above water and stuff like that).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Misha</title>
		<link>http://www.nouveller.com/quick-tips/quick-tip-8-limit-the-length-of-the_excerpt-in-wordpress/comment-page-1/#comment-9432</link>
		<dc:creator>Misha</dc:creator>
		<pubDate>Sat, 29 Oct 2011 19:55:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.nouveller.com/?p=1754#comment-9432</guid>
		<description>Ha, sorry for getting wrong your name! I wanted to say thank you, Benjamin!</description>
		<content:encoded><![CDATA[<p>Ha, sorry for getting wrong your name! I wanted to say thank you, Benjamin!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

