View Full Version : Read More in exerpt WordPress

08-07-2012, 03:49 PM
here is my exerpt

<?php echo limit_words(get_the_excerpt(),30); ?>

here is my function which I have now managed to not show the [...] but It is still now showing a link to Read More?!

function limit_words($string, $word_limit) {

// creates an array of words from $string (this will be our excerpt)
// explode divides the excerpt up by using a space character

$words = explode(' ', $string);

// this next bit chops the $words array and sticks it back together
// starting at the first word '0' and ending at the $word_limit
// the $word_limit which is passed in the function will be the number
// of words we want to use
// implode glues the chopped up array back together using a space character

return implode(' ', array_slice($words, 0, $word_limit));


08-07-2012, 05:08 PM
Not that I don't have an answer ...
But did you see this already?


I think that explains better than I can.
You may want to do the excerpt a different way?