1. Home
  2. Docs
  3. Subscribe2
  4. Hooks, API & Customization
  5. s2_excerpt_on_words

s2_excerpt_on_words

Introduced in Version 11.5, this filter allows the excerpt to be generated on character count rather than words. This may be particularly useful for languages that use very few spaces the grammar construct – for example Japanese. By default written Excerpts are used first, content before an HTML <!–more–> tag second and the first 55 words of the main content as a final option. This filter alters the final option to use the first 55 characters instead of words. You can alter the length of the excerpt using the ‘s2_excerpt_length’ filter.

add_filter( 's2_excerpt_on_words', '__return_false' );
Was this article helpful to you? Yes No 1

How can we help?