Post Excerpts Length

When adding posts to your newsletter with the Posts block or Automatic Latest Content block, excerpts can be displayed.

By default, with auto-generated excerpts, MailPoet will limit the length of the excerpt to 60 words. 

If you are using the <!-- more --> tag in the content, MailPoet will use all of the text above it for the excerpt.

Alternatively, if you have manually set a custom excerpt for the post, then MailPoet will use that custom excerpt.

With auto-generated excerpts, if you wish to override the default length value (e.g., display 20 instead of 60 words), you can use the following code:

add_filter('mailpoet_newsletter_post_excerpt_length', function() {
  return 20; /** # of words to display */
});

Just add this code to the bottom of your functions.php file inside your current theme folder, or by using the Code Snippets plugin as described in our guide here.