Documentation / Filters / Change excerpt length

Change excerpt length

If you want to change the excerpt length through code you can use the following filter:

Premium: ‘rp4wp_general_post_excerpt_length’
Free: ‘rp4wp_excerpt_length’

Notice in the premium filter the _post_ in the filter, this will dynamically per post type. So for pages the filter will be ‘rp4wp_general_page_excerpt_length’.

Code Example

You can use below code snippet to change the Related Posts for WordPress Premium post excerpt lenght.