WordPress custom excerpt length

Posted by Prem Tiwari | Updated on

Use the below example code in your theme’s functions.php file for WordPress custom excerpt length.

Limit the length of the displayed excerpt by writing in the theme: excerpt(’20’); Example: This will limit the excerpt to 22 characters.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers