1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

automating read more placement

Discussion in 'PHP & Perl' started by stevenukas, Mar 3, 2012.

  1. stevenukas

    stevenukas Junior Member

    Joined:
    Jan 2, 2012
    Messages:
    122
    Likes Received:
    13
    Location:
    Wonderland
    I would like to know how to automate wp so that articles that has more then 300 words would have read more... link to full article.
    Code:
    function custom_excerpt_length($length) {
     return 300; // Change this word count to whatever you want.
    }
    add_filter('excerpt_length', 'custom_excerpt_length', 20 );
    I have tried using this in thesis but it doesn't work. Any advice ?
     
  2. BlueZero

    BlueZero Power Member

    Joined:
    Jul 6, 2011
    Messages:
    500
    Likes Received:
    257
    Occupation:
    Webdeveloper, Project Manager
    Location:
    Byte in the Net
    Home Page:
    Have tried Evermore plugin?

    Code:
    http://wordpress.org/extend/plugins/evermore/
     
  3. stevenukas

    stevenukas Junior Member

    Joined:
    Jan 2, 2012
    Messages:
    122
    Likes Received:
    13
    Location:
    Wonderland
    Thanks,works like a charm