Modify Excerpt Length and More Tags

Posted by ADMIN On 4:59 AM
WordPress lets you display Excerpts, but up until version 2.9 you could not control the excerpt length. With the following code, you can increase the length from default 55 words to as many words as you like. Open your functions.php file and add the follwowing codes in there:

    // Changing excerpt length
    function new_excerpt_length($length) {
    return 100;
    }
    add_filter('excerpt_length', 'new_excerpt_length');

    // Changing excerpt more
    function new_excerpt_more($more) {
    return '…';
    }
    add_filter('excerpt_more', 'new_excerpt_more');

Change the 100 word limit to the count that you desire.

0 Response to "Modify Excerpt Length and More Tags"

Post a Comment

Google Translator

Search Box

Blog Archive

User Status

Free counters!

About Me

ADMIN
Pakistan
View my complete profile

Recent Posts

Recent Comments