How to change the number of words in the WordPress Twenty Twelve theme summary

You can add these lines within your functions.php. I recommend that you create a child theme for WordPress before adding code. Themes are up to date and you would lose changes differently.

Place this code at the end of the file, remember that in this example the number 20 represents the maximum number of words that can be included in the summary.

function twentytwelve_excerpt_legth( $length ) {
return 20;
add_filter( 'excerpt_length','twentytwelve_excerpt_length' );

To get the best result, you should test. Normally 20 words for a summary are few. If you have any problems with my guide or it is unclear, please leave a comment and I will respond as soon as possible.

It's possible to leave a comment as registered users to the site, accessing through social, wordpress account or as anonymous users. If you want to leave a comment as an anonymous user you will be notified by email of a possible response only if you enter the email address (optional). The insertion of any data in the comment fields is totally optional. Whoever decides to insert any data accepts the treatment of these last ones for the inherent purposes of the service that is the answer to the comment and the strictly necessary communications.

Leave a Reply