[contact-form-7 id="24078" title="Feedback EN"]

How to limit excerpt length

This tutorial will show you how to limit the post excerpt in WordPress


Example 1. Editing loop.php file

1. Open wp-content/themes/theme### folder

2. Open loop.php file with your HTML/PHP editor (Dreamweaver, Expression Web etc)

3. Use search tool (CTRL+F) and search for get_the_excerpt()

You should see somehting like this:

<?php if (is_single()) { 
	} else { 
		$excerpt = get_the_excerpt(); echo my_string_limit_words($excerpt,'20');

Here the excerpts are limited by the number of words. Modify the value here: ($excerpt,’20‘)


Feel free to check the detailed video tutorial below:
How to limit excerpt length

How to limit excerpt length, 5.0 out of 5 based on 1 rating