This will set word limit on the_excrept() to 9999:
function new_excerpt_length($length) {
return 9999;
}
add_filter('excerpt_length', 'new_excerpt_length');
It works to show a pretty big excerpt but it's a bad solution to my problem when all I wan't to do is to show all words from the_post() in the_excerpt(). Anyone who can help me with this?
Than why don't u use. the_content(); function it will show full content of post.
check reference here
An excerpt is a short extract from a post. If you want to show the entire post content then you're using the wrong function.
Replace the_excerpt()
with the_content()
.
If there's some reason you want to show all the post content inside the_excerpt()
you could use:
function wpse_replace_excerpt_with_content( $excerpt ) {
return get_the_content();
}
add_filter( 'the_excerpt', 'wpse_replace_excerpt_with_content' );
I can't imagine why you'd want to do this but it is possible.