Change wordpress excerpt length

Copy and paste the given blow code in your theme functions.php file which will change the length of the wordpress excerpt function.

function ratanjyot_solutions_excerpt_length($length) {

return 50;

}

add_filter(‘excerpt_length’, ‘ratanjyot_solutions_excerpt_length’);

The above code set the excerpt length to 50 words.

Share This Post

Post Comment