Jump to content
Sign in to follow this  
jankowalski

excerpt lengh

Recommended Posts

jankowalski

i have managed to specify length of custom post types excerpts by this function:

 function new_excerpt_length($length) {
		global $post;
		if ($post->post_type == 'post')
			return 13;
		else if ($post->post_type == 'book')
			return 23;
		else if ($post->post_type == 'video')
			return 0;
		else
			return 55;
	}
	add_filter('excerpt_length', 'new_excerpt_length');

however one problem, for videos CPT i decided not to show excerpt (or to show 0 words rather) but wordpress still shows [...] sign after. How can i hide it, just for videos cpt?

Share this post


Link to post
Share on other sites
Jenny
http://www.wprecipes.com/how-to-remove-the-from-the-excerpt should help ;)

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

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  

×