• Hi,

    on my homepage, I have […] showing at the end of my exerpt, I would like to change this to read: Read More and would like to make it linkable.

    Can anyone help me here?

    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • What is your theme and URL to your site?

    Thread Starter jbiddulph

    (@jbiddulph)

    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));
    
    }

    I would suggest you read this the_exerpt() Codex

    Thread Starter jbiddulph

    (@jbiddulph)

    I have now sorted this by adding a new function to a link to the post at the end of my exerpt

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘replacing […] for Read More?’ is closed to new replies.