• 0
Sign in to follow this  
Followers 0

Excerpt length


Question

Posted · Report post

Hello :)

 

Can anybody help me with my excerpts? I use DMS developer and I've tried to set the number of words in the exerpts to 25, but there is no way getting DMS to show only this 25 words. By default excerpts show 55 words. I've deactivated every single plugin, nothing changes. Maybe the solution is really easy, but I don't get it.

 

Thank you for your help!

 

Petra

Share this post


Link to post
Share on other sites

4 answers to this question

  • 0

Posted · Report post

This was a bug and is fixed in next release thankyou.

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Petra - Thanks for bringing this to our attention, it appears to be a bug and I've gone ahead and reported it to our development team.

 

In the meantime, I've got a workaround for you that I've tested and confirmed will do the trick. If you haven't already, you'll need to run off a base child theme for DMS. One is available for download at https://www.dropbox.com/s/g0tgq9ug1h1km98/dms-template-theme.zip and information on child themes is available at http://docs.pagelines.com/customize/base-child-theme.

 

Once you've got the new theme activated, from the WordPress dashboard navigate to Appearance - Editor and then under templates, click on Theme Functions (functions.php). At the very bottom of that document, add the following and then save.

function custom_excerpt_length ( $length ) {
		return 25;
}

add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

This will overwrite the default excerpt length in WP from 55 to 25.

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Yes, thank you! I have already noticed it. Works perfectly now!

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Fantastic!

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  
Followers 0