Most of the themes in WordPress show excerpts on archive pages like category and tags. By default, the excerpt length is 55 words in WordPress.
We can change this default length using WordPress built-in filter named ‘excerpt_length’. This will allow you to change the default length of excerpts for all loops.
Simply copy and paste the following code to your functions.php file.
function wpclap_change_excerpt_length($length) { return 20; } add_filter('excerpt_length', 'wpclap_change_excerpt_length', 999);
The above code will change the default excerpt length to 20 words. You can change ‘20’ to any number as per your theme design requirements.