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.

Bansal Sumit

To seek challenging roles and to achieve excellence in the field of Open Source Web Technology with a profound spirit of commitment and dedication.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *