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.
// 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