I have added the following code to my functions.php script within my theme:
function custom_excerpt_length( $length ) {
return 15;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
function new_excerpt_more( $more ) {
return '...';
}
add_filter('excerpt_more', 'new_excerpt_more');
as suggested on this page: http://codex.wordpress.org/Template_Tags/the_excerpt
but the length of the excerpt is still the default 55 words and the string at the end is still [...]
rather than ...
.
WordPress version is 3.4.1
The code I am using to display the excerpt is simply:
the_excerpt();
Does anyone have any ideas on how to fix it so that the additions to my functions.php work?
Use this code for limit the content
I’ve managed to achieve the desired result by using something along the lines of:
Hopefully this is some use to someone who discovers this question.