Skip to content

s2_excerpt_length

  • Subscribe2
  • Updated Nov 23, 2023
  • 1 min read

this hook allows the length of the default excerpt to be modified. the default is approximately 55 words. Example code to change the excerpt length is as follows:

function my_excerpt() {
// return whatever number of words you want the excerpt length to be
return 30;
}
add_filter('s2_excerpt_length', 'my_excerpt');

Last updated on

Filed under Hooks, API & Customization

Still stuck?

Our support team can walk you through it.