<?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: Changing the excerpt length, wordpress 2.9</title>
	<atom:link href="http://analysisandreview.com/wordpress/changing-the-excerpt-length-wordpress-2-8/feed/" rel="self" type="application/rss+xml" />
	<link>http://analysisandreview.com/wordpress/changing-the-excerpt-length-wordpress-2-8/</link>
	<description>Brain Dumps For All</description>
	<lastBuildDate>Fri, 10 Feb 2012 03:56:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Kurt Turner</title>
		<link>http://analysisandreview.com/wordpress/changing-the-excerpt-length-wordpress-2-8/#comment-687</link>
		<dc:creator>Kurt Turner</dc:creator>
		<pubDate>Thu, 24 Mar 2011 18:49:56 +0000</pubDate>
		<guid isPermaLink="false">http://analysisandreview.com/?p=611#comment-687</guid>
		<description>Try moving the code around within your .php.. also wrap it in a DIV and format as necessary.</description>
		<content:encoded><![CDATA[<p>Try moving the code around within your .php.. also wrap it in a DIV and format as necessary.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://analysisandreview.com/wordpress/changing-the-excerpt-length-wordpress-2-8/#comment-478</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Tue, 01 Mar 2011 20:42:42 +0000</pubDate>
		<guid isPermaLink="false">http://analysisandreview.com/?p=611#comment-478</guid>
		<description>Hello i have a problem with this function.
The texte of my link is appear in top of my single page...
Can you help me please?

This is my function :

&#039;, &#039;]]&gt;&#039;, $text);
$text = strip_tags($text);
$excerpt_length = 42; // Changes excerpt character count
$words = explode(&#039; &#039;, $text, $excerpt_length + 1);
if (count($words) &gt; $excerpt_length) {
array_pop($words);
array_push($words, &#039;&lt;a href=&quot;&#039;.get_permalink().&#039;&quot; rel=&quot;nofollow&quot;&gt;Read Full Post &#8594;&lt;/a&gt;&#039;); // Changes link text
$text = implode(&#039; &#039;, $words);
}
}
return $text;
}
?&gt;

Thinks a lot.
PS : this is the page where you can see the probleme
http://actu.loiregrafix.fr/un-site-vitrine-pour-la-fonderie-plomb-navy-lest</description>
		<content:encoded><![CDATA[<p>Hello i have a problem with this function.<br />
The texte of my link is appear in top of my single page&#8230;<br />
Can you help me please?</p>
<p>This is my function :</p>
<p>&#8216;, &#8216;]]&gt;&#8217;, $text);<br />
$text = strip_tags($text);<br />
$excerpt_length = 42; // Changes excerpt character count<br />
$words = explode(&#8216; &#8216;, $text, $excerpt_length + 1);<br />
if (count($words) &gt; $excerpt_length) {<br />
array_pop($words);<br />
array_push($words, &#8216;<a href="'.get_permalink().'" rel="nofollow">Read Full Post &rarr;</a>&#8216;); // Changes link text<br />
$text = implode(&#8216; &#8216;, $words);<br />
}<br />
}<br />
return $text;<br />
}<br />
?&gt;</p>
<p>Thinks a lot.<br />
PS : this is the page where you can see the probleme<br />
<a href="http://actu.loiregrafix.fr/un-site-vitrine-pour-la-fonderie-plomb-navy-lest" rel="nofollow">http://actu.loiregrafix.fr/un-site-vitrine-pour-la-fonderie-plomb-navy-lest</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daryl Łomża</title>
		<link>http://analysisandreview.com/wordpress/changing-the-excerpt-length-wordpress-2-8/#comment-104</link>
		<dc:creator>Daryl Łomża</dc:creator>
		<pubDate>Wed, 05 Jan 2011 00:01:32 +0000</pubDate>
		<guid isPermaLink="false">http://analysisandreview.com/?p=611#comment-104</guid>
		<description>It&#039;s excellent site, I was looking for something like this</description>
		<content:encoded><![CDATA[<p>It&#8217;s excellent site, I was looking for something like this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: me</title>
		<link>http://analysisandreview.com/wordpress/changing-the-excerpt-length-wordpress-2-8/#comment-102</link>
		<dc:creator>me</dc:creator>
		<pubDate>Tue, 04 May 2010 17:22:45 +0000</pubDate>
		<guid isPermaLink="false">http://analysisandreview.com/?p=611#comment-102</guid>
		<description>In wordpress 2.9 skip all that other stuff and just do this:

&lt;code&gt;
// change default length of the_excerpt from 55
function new_excerpt_length($length) {
	return 20;
}
add_filter(&#039;excerpt_length&#039;, &#039;new_excerpt_length&#039;);


// change excerpt more [...]
function new_excerpt_more($post) {
	return &#039;&lt;a href=&quot;&#039;. get_permalink() . &#039;&quot; rel=&quot;nofollow&quot;&gt;...more&lt;/a&gt;&#039;;
}
add_filter(&#039;excerpt_more&#039;, &#039;new_excerpt_more&#039;);
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>In wordpress 2.9 skip all that other stuff and just do this:</p>
<p><code><br />
// change default length of the_excerpt from 55<br />
function new_excerpt_length($length) {<br />
	return 20;<br />
}<br />
add_filter('excerpt_length', 'new_excerpt_length');</p>
<p>// change excerpt more [...]<br />
function new_excerpt_more($post) {<br />
	return '<a href="'. get_permalink() . '" rel="nofollow">...more</a>';<br />
}<br />
add_filter('excerpt_more', 'new_excerpt_more');<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Fine</title>
		<link>http://analysisandreview.com/wordpress/changing-the-excerpt-length-wordpress-2-8/#comment-101</link>
		<dc:creator>Steven Fine</dc:creator>
		<pubDate>Sun, 02 May 2010 02:29:27 +0000</pubDate>
		<guid isPermaLink="false">http://analysisandreview.com/?p=611#comment-101</guid>
		<description>&lt;a href=&quot;#comment-406&quot; rel=&quot;nofollow&quot;&gt;@Kurt&lt;/a&gt;

Kurt - I want to get rid of the exerpts all together.

I have tried everything without luck

If I put the $excerpt_length = apply_filters(‘excerpt_length’, 0) will it work ?</description>
		<content:encoded><![CDATA[<p><a href="#comment-406" rel="nofollow">@Kurt</a></p>
<p>Kurt &#8211; I want to get rid of the exerpts all together.</p>
<p>I have tried everything without luck</p>
<p>If I put the $excerpt_length = apply_filters(‘excerpt_length’, 0) will it work ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kurt</title>
		<link>http://analysisandreview.com/wordpress/changing-the-excerpt-length-wordpress-2-8/#comment-100</link>
		<dc:creator>Kurt</dc:creator>
		<pubDate>Mon, 15 Feb 2010 03:39:46 +0000</pubDate>
		<guid isPermaLink="false">http://analysisandreview.com/?p=611#comment-100</guid>
		<description>&lt;a href=&quot;#comment-384&quot; rel=&quot;nofollow&quot;&gt;@CK&lt;/a&gt;
I have updated the code - thanks</description>
		<content:encoded><![CDATA[<p><a href="#comment-384" rel="nofollow">@CK</a><br />
I have updated the code &#8211; thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CK</title>
		<link>http://analysisandreview.com/wordpress/changing-the-excerpt-length-wordpress-2-8/#comment-99</link>
		<dc:creator>CK</dc:creator>
		<pubDate>Tue, 05 Jan 2010 17:10:39 +0000</pubDate>
		<guid isPermaLink="false">http://analysisandreview.com/?p=611#comment-99</guid>
		<description>Darn rendering. Could the host edit this post so that the content is in stripped out code instead of html rendered copy? Thx</description>
		<content:encoded><![CDATA[<p>Darn rendering. Could the host edit this post so that the content is in stripped out code instead of html rendered copy? Thx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CK</title>
		<link>http://analysisandreview.com/wordpress/changing-the-excerpt-length-wordpress-2-8/#comment-98</link>
		<dc:creator>CK</dc:creator>
		<pubDate>Tue, 05 Jan 2010 17:08:46 +0000</pubDate>
		<guid isPermaLink="false">http://analysisandreview.com/?p=611#comment-98</guid>
		<description>It does not work due to the fact that the code in quotes is rendered oddly and some of your symbols are messed. example: line 3 is suppose to have 2 single quotes, not a double quote (this goes for some another case in your code) and there is a &gt; instead of a &gt;. You&#039;re also missing the permalink values in the array_push so it pulls the right link. The fix below worked for me, but I still can&#039;t get rid of the original Read More generated by wordpress even though the script says it should remove it.

Here&#039;s the updated code with the corrections:

function my_wp_trim_excerpt($text) { // Fakes an excerpt if needed
$raw_excerpt = $text;
if ( &#039;&#039; == $text ) {
$text = get_the_content(&#039;&#039;);

$text = strip_shortcodes( $text );

$text = apply_filters(&#039;the_content&#039;, $text);
$text = str_replace(&#039;]]&gt;&#039;, &#039;]]&gt;&#039;, $text);
$text = strip_tags($text);
$excerpt_length = apply_filters(&#039;excerpt_length&#039;, 55);
$words = explode(&#039; &#039;, $text, $excerpt_length + 1);
if (count($words) &gt; $excerpt_length) {
array_pop($words);
array_push($words, &#039; ... &lt;a href=&quot;&#039;. get_permalink() . &#039;&quot; rel=&quot;nofollow&quot;&gt;Read More ...&lt;/a&gt;&#039;);
$text = implode(&#039; &#039;, $words);
}
}
return apply_filters(&#039;wp_trim_excerpt&#039;, $text, $raw_excerpt);
}

remove_filter(&#039;get_the_excerpt&#039;, &#039;wp_trim_excerpt&#039;);
add_filter(&#039;get_the_excerpt&#039;, &#039;my_wp_trim_excerpt&#039;);

Anyone know the fix to remove the original excerpt? remove_filter() isn&#039;t working in the functions.php.</description>
		<content:encoded><![CDATA[<p>It does not work due to the fact that the code in quotes is rendered oddly and some of your symbols are messed. example: line 3 is suppose to have 2 single quotes, not a double quote (this goes for some another case in your code) and there is a &gt; instead of a &gt;. You&#8217;re also missing the permalink values in the array_push so it pulls the right link. The fix below worked for me, but I still can&#8217;t get rid of the original Read More generated by wordpress even though the script says it should remove it.</p>
<p>Here&#8217;s the updated code with the corrections:</p>
<p>function my_wp_trim_excerpt($text) { // Fakes an excerpt if needed<br />
$raw_excerpt = $text;<br />
if ( &#8221; == $text ) {<br />
$text = get_the_content(&#8221;);</p>
<p>$text = strip_shortcodes( $text );</p>
<p>$text = apply_filters(&#8216;the_content&#8217;, $text);<br />
$text = str_replace(&#8216;]]&gt;&#8217;, &#8216;]]&gt;&#8217;, $text);<br />
$text = strip_tags($text);<br />
$excerpt_length = apply_filters(&#8216;excerpt_length&#8217;, 55);<br />
$words = explode(&#8216; &#8216;, $text, $excerpt_length + 1);<br />
if (count($words) &gt; $excerpt_length) {<br />
array_pop($words);<br />
array_push($words, &#8216; &#8230; <a href="'. get_permalink() . '" rel="nofollow">Read More &#8230;</a>&#8216;);<br />
$text = implode(&#8216; &#8216;, $words);<br />
}<br />
}<br />
return apply_filters(&#8216;wp_trim_excerpt&#8217;, $text, $raw_excerpt);<br />
}</p>
<p>remove_filter(&#8216;get_the_excerpt&#8217;, &#8216;wp_trim_excerpt&#8217;);<br />
add_filter(&#8216;get_the_excerpt&#8217;, &#8216;my_wp_trim_excerpt&#8217;);</p>
<p>Anyone know the fix to remove the original excerpt? remove_filter() isn&#8217;t working in the functions.php.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kilroy</title>
		<link>http://analysisandreview.com/wordpress/changing-the-excerpt-length-wordpress-2-8/#comment-97</link>
		<dc:creator>Kilroy</dc:creator>
		<pubDate>Wed, 09 Dec 2009 22:17:21 +0000</pubDate>
		<guid isPermaLink="false">http://analysisandreview.com/?p=611#comment-97</guid>
		<description>Works for me.. what version of WP do you use? Also paste a copy of your functions.php here and I&#039;ll see if I can figure out whats up.. chances are you didn&#039;t use the correct syntax.</description>
		<content:encoded><![CDATA[<p>Works for me.. what version of WP do you use? Also paste a copy of your functions.php here and I&#8217;ll see if I can figure out whats up.. chances are you didn&#8217;t use the correct syntax.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergei Plaxienko</title>
		<link>http://analysisandreview.com/wordpress/changing-the-excerpt-length-wordpress-2-8/#comment-96</link>
		<dc:creator>Sergei Plaxienko</dc:creator>
		<pubDate>Wed, 09 Dec 2009 13:53:08 +0000</pubDate>
		<guid isPermaLink="false">http://analysisandreview.com/?p=611#comment-96</guid>
		<description>Does not work. At all.</description>
		<content:encoded><![CDATA[<p>Does not work. At all.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

