Jump to content
Sign in to follow this  
patrick6000

excerpt_lenght doesn't seem to work

Recommended Posts

patrick6000

I've tried to change the lenght of the excerpt with this filter

add_filter('excerpt_length', 'my_excerpt_length');
		function my_excerpt_length($length) {
		return 20;
		}	

It doesn't seem to work. Does somebody know how to fix this ? Thanks

Share this post


Link to post
Share on other sites
catrina
function new_excerpt_length($length) {
		return 20;
	}
	add_filter('excerpt_length', 'new_excerpt_length');

The code above is the updated excerpt length code. Try adding that one instead.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
patrick6000

thank you Catrina but it doesn't seem to work better

Share this post


Link to post
Share on other sites
Andrew

Hey Eric, Did that get it fixed?

Share this post


Link to post
Share on other sites
patrick6000

Hi cmunns, I've already checked that, but still doesn't work Eric

Share this post


Link to post
Share on other sites
patrick6000

Hi, my apologies to all of you, i didn't read carefully the wordpress doc. I didn't know about the difference between "Excerpt" and "automatic excerpt" Eric

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×