Return to Snippet

Revision: 88488
at March 1, 2022 00:44 by chrisaiv


Updated URL
https://www.chrisjmendez.com/2014/09/13/wordpress-limit-the-excerpts-word-count/

Updated Code
https://www.chrisjmendez.com/2014/09/13/wordpress-limit-the-excerpts-word-count/

Revision: 67348
at September 13, 2014 09:52 by chrisaiv


Initial Code
/**
* Limit The Excerpt’s Word Count
*
* http://www.smashingmagazine.com/2011/12/07/10-tips-optimize-wordpress-theme/
* 
* 
*/
function ilc_excerpt_length( $length ){
  return 10;
}
add_filter('excerpt_length', 'ilc_excerpt_length');

Initial URL
http://www.smashingmagazine.com/2011/12/07/10-tips-optimize-wordpress-theme/

Initial Description
One thing that can go wrong in WordPress magazine themes is when users include too many words before the more tag.

Initial Title
Wordpress: Limit The Excerpt’s Word Count

Initial Tags
wordpress

Initial Language
PHP