Categories

How to limit excerpt length

Rating: 5.0/5. From 2 votes.
Please wait...

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

Clean And Simple Wordpress Themes
This entry was posted in WordPress, WordPress Tutorials and tagged archived_tutorial, blog, excerpt, length, post, WordPress. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket