PHP – WordPress – Function to Change the Default Length of Excerpts

The given PHP example helps you to change the default length of excerpts into WordPress. 

Code Example:
<?php
function new_excerpt_length($length) {
	return 40;
}
add_filter('excerpt_length', 'new_excerpt_length');
?>

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail

Leave a Reply

Your email address will not be published. Required fields are marked *

*