- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
How to limit excerpt length
March 28, 2011
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