Limit excerpt length by characters in wordpress

On wordpress home page many sites are showing the post description or we can say the excerpt. For UI purpose some time we need to control the excerpt character limit.  I already written about this in following article. But some people need the more advanced excerpt. Following code snippet will be helpful to you show the limit excerpt length by characters in wordpress.

First open your functions.php file and put following code in that file.

Solution code is Hidden! It's Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.

Use this function if you’re planning on using it more than once with a different amount of characters.

Call the function plus the amount of characters –

<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php echo get_excerpt(125); ?>

Following is my old article link.
http://wpapi.com/set-wordpress-post-excerpt-length-limited-characters/

Limit excerpt length by characters in wordpress

Limit excerpt length by characters in wordpress

6 Comments

Add a Comment

Your email address will not be published. Required fields are marked *