Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts

    Question Read More in exerpt WordPress

    here is my exerpt

    PHP Code:
    <?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?!
    PHP Code:
    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($words0$word_limit));



  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,502
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Not that I don't have an answer ...
    But did you see this already?

    http://codex.wordpress.org/Customizing_the_Read_More

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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •