Note that I used this with wordpress.
I added this function to functions.php:
function string_limit_words($string, $word_limit)
{
$words = explode(' ', $string, ($word_limit + 1));
if(count($words) > $word_limit)
array_pop($words);
return implode(' ', $words);
}
I added this to my html:
<?php if ( $woo_options['woo_post_content_home'] == "true" ) the_content(); else $excerpt = get_the_excerpt(); echo string_limit_words($excerpt,38); ?>
What this does is shortens the text to the number of words specified (in this sample its 38). What I want to do is add […] after those 38 words. Any suggestions on how I can do this?
Regards,
Uh…